Transform JSON Object to JSON Schema Version 4
npm install json2schema``bash`
$ npm install -g json2schema
CLI Tool
`bash
$ json2schema -h
Usage: json2schema [options]
Convert JSON Objects to JSON Schema.
Options:
-h, --help output usage information
-V, --version output the version number
-o, --out
`
In your JavaScript
`js
var Coverter = require('json2schema');
var generatedSchema = Converter.convert({
data:
});
`
`bash``
$ json2schema ./jsondocs/myObject.json --out ../../schema.json
Contributions are welcomed and encouraged. See CONTRIBUTING.md for instructions.