ngest
Ingests multiple JSON schemas into one schema, by resolving $ref property data. Will ingest absolute and relative references
What is it for?
You know those times when you have loads of json schema and sub-schema that you need to use but don't want to or can't have them on an open network location, well this script allows you to download or ingest them and produce one composite schema, that you can put in that secure location.
Install
Install with npm
$ npm i ngest --save-dev
Usage
var ngest = require('ngest');
ngest(source, destination);
If you want to generate sample data use
var ngest = require('ngest');
ngest(source, destination, sample);
Where
- source is path to source schema
- destination is path you want to write the composite schema
- sample is the path you want to write the sample json
Both the source and destination are file locations currently. The script will only ready from a local file system.
Roadmap
- Accept remote locations for source and destination
- Download schemas from http locations
- Return composite schema instead of writing to a file
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Authors
Morlene Fisher
David Toth
License
Copyright © 2016 Kenobi Media Ltd
Licensed under the MIT license.