ajv-cli-custom
v1.0.3
Published
Supply custom keywords and format names to ajv-cli via a json file
Downloads
5
Maintainers
Readme
ajv-cli-custom
Inform ajv-cli
of your custom keywords and format names via a JSON file.
Usage
Install this package
npm install -g ajv-cli-custom
Then create a file named customs.json
in the same directory you wish to run the ajv
command. The JSON object should contain two properties (keywords
and formats
). Both accept an array of strings as values. Either are optional.
{
"keywords": ["keyword1", "keyword2"],
"formats": ["format1", "format2"]
}
Finally, invoke ajv
using the -c
option to specify this module. For example:
ajv compile -s myschema.schema.json -c ajv-cli-custom