Please note this library is not ready for production use.
Build view models (and collections) from JSON Schema correlations.
Models emit change
and other 'lifecycle' events, suitable for integration
with reactive data-binding libraries (e.g., component-reactive
or rivets.)
(For an example use in form validation, see test/integration.html.)
A draft REST interface using JSON Schema hypermedia specification is optionally available for fetching/refreshing/creating/updating/deleting models, see sync.js.
- object- and property- level validation for models
- object- and items- level validation for collections
- input coercion (data type + defaults)
- REST interface using JSON Schema hypermedia
- extendable with custom model classes
- full support for any JSON Schema including combination conditions (anyOf, allOf, oneOf)
- access to descriptive schema data (description, name, links, etc) (planned)
$ component install ericgj/json-schema-model
Coming soon, for now check test/integration.html and test/tests.js.
MIT