jso-cli
v1.0.13
Published
Generate JSON schema to an output file
Downloads
18
Readme
jso-cli
Contents
- Installation
- Commands
- [Generate JSON Schema]
- [jso-cli options]
Installation
npm install -g jso-cli
Generate JSON Schema
This command generates JSON schema files from any valid JSON File
jso-cli -d ./valid.input.json -o ./output.schema.json
Parameters
-d
- JSON data
-o
- Output file name of generated JSON Schema
You can then validate data with the schema using ajv-cli
ajv-cli validate -d ./valid.input.json -s ./output.schema.json
ajv-cli validate -d ./test.input.json -s ./output.schema.json