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 |
Members
-
<static> typeGroupValidators :Object
-
TODO
Type:
- Object
-
<static> types :Object
-
TODO
Type:
- Object
-
<static> validationKeywords :Object
-
TODO
Type:
- Object
Methods
-
<static> extend()
-
<static> validate(value, schema, opts)
-
TODO
Parameters:
Name Type Argument Description value
* TODO
schema
Object <optional>
TODO
opts
Object <optional>
Configuration options.
-
validate(value, opts)
-
Validate the provided value against this schema.
Parameters:
Name Type Argument Description value
* Value to validate.
opts
Object <optional>
Configuration options.
Returns:
Array of errors or
undefined
if valid.- Type
- array | undefined