Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ericgj/json-schema-model
Builds models from JSON Schema correlations
https://github.com/ericgj/json-schema-model
Last synced: about 2 months ago
JSON representation
Builds models from JSON Schema correlations
- Host: GitHub
- URL: https://github.com/ericgj/json-schema-model
- Owner: ericgj
- Created: 2013-10-23T16:24:33.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-27T04:49:17.000Z (almost 11 years ago)
- Last Synced: 2023-03-11T07:13:09.643Z (almost 2 years ago)
- Language: JavaScript
- Size: 273 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# json-schema-model
**Please note this library is not ready for production use.**
Build view models (and collections) from [JSON Schema][json-schema]
correlations.Models emit `change` and other 'lifecycle' events, suitable for integration
with reactive data-binding libraries (e.g., [component-reactive][reactive]
or [rivets][rivets].)(For an example use in form validation, see
[test/integration.html][example].)A draft REST interface using JSON Schema hypermedia specification is
optionally available for fetching/refreshing/creating/updating/deleting
models, see [sync.js][sync].## Features
- 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)## Installation
$ component install ericgj/json-schema-model
## API
Coming soon, for now check [test/integration.html][example] and [test/tests.js][tests].
## License
MIT
[json-schema]: http://json-schema.org
[reactive]: https://github.com/component/reactive
[rivets]: https://github.com/mikeric/rivets
[example]: test/integration.html
[tests]: test/tests.js
[sync]: sync.js