Class: Schema

Schema


new Schema(definition)

js-data's Schema class.

import {Schema} from 'js-data'
Parameters:
Name Type Description
definition Object

Schema definition according to json-schema.org

Source:

Members


<static> typeGroupValidators :Object

TODO

Type:
  • Object
Source:

<static> types :Object

TODO

Type:
  • Object
Source:

<static> validationKeywords :Object

TODO

Type:
  • Object
Source:

Methods


<static> extend()

Source:

<static> validate(value, schema, opts)

TODO

Parameters:
Name Type Argument Description
value *

TODO

schema Object <optional>

TODO

opts Object <optional>

Configuration options.

Source:

validate(value, opts)

Validate the provided value against this schema.

Parameters:
Name Type Argument Description
value *

Value to validate.

opts Object <optional>

Configuration options.

Source:
Returns:

Array of errors or undefined if valid.

Type
array | undefined