Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SchemaService

Hierarchy

  • SchemaService

Index

Constructors

constructor

Properties

cache

cache: {} = ...

cache for resolved json-pointer

Type declaration

core

core: any

data

data: any

schema

schema: JSONSchema

Methods

addDefaultData

  • addDefaultData(data?: any, schema?: JSONSchema): any
  • Update data by any missing (default) values specified in the json-schema

    Parameters

    Returns any

    json data with valid default data values

destroy

  • destroy(): void

get

  • get(pointer: string, data?: any): any
  • Return the json-schema for the requested pointer. Resolved the pointer on the stored schema by the accompanied json-data, which is required to resolve optional json-schema values.

    Parameters

    • pointer: string

      pointer in data

    • Optional data: any

    Returns any

    json-schema for the requested pointer

getChildSchemaSelection

  • getChildSchemaSelection(pointer: string, property: string | number): JSONSchema[]

getTemplate

  • Create the template data object based on the json-schema, which fullfills the schemas structure as much as possible

    Parameters

    Returns any

    data corresponding to json-schema

resetCache

  • resetCache(): void

setData

  • setData(data: any): void
  • Sets the root data. This is optional and used within internal functions to support optional data-parameters. On every change in data, call this method with that latest state schemaService.setData(latestData);

    Parameters

    • data: any

      latest root data corresponding to stored json-schema

    Returns void

setSchema

Generated using TypeDoc