Skip to content

Latest commit

 

History

History
44 lines (24 loc) · 1.13 KB

cli.rst

File metadata and controls

44 lines (24 loc) · 1.13 KB

Command line tool

You can use the tool with the provided CLI script.

Pass a filename of an input schema.

compiletojsonschema input.json

The output is printed. To save the output to file, simple redirect it:

compiletojsonschema input.json > output.json

Set a directory for codelists

You can set the directory that is searched for codelists using the --codelist-base-directory or -c flag.

compiletojsonschema -c data/codelists schema.json
compiletojsonschema --codelist-base-directory data/codelists schema.json

You can pass this multiple times.

compiletojsonschema -c data/codelists/open -c data/codelists/closed schema.json

Set additional properties false everywhere

To enable this mode, pass the --set-additional-properties-false-everywhere or -s flag.

compiletojsonschema -s input.json
compiletojsonschema --set-additional-properties-false-everywhere input.json