ajv-cli
ajv-cli copied to clipboard
Use AJV plugins with ajv-cli?
Is there a way to specify AJV plugins for ajv-cli to use?
Specifically, I want to use https://github.com/luzlab/ajv-formats-draft2019 when running ajv compile
to avoid errors about unknown format "idn-hostname" is used in schema at path...
. Thanks.
Yes, see -c option: https://github.com/ajv-validator/ajv-cli#-c---custom-keywordsformats-definitions
Probably readme needs to clarify that any plugin can be passed this way.
I have the same problem, after updating to 4.0 formats are throwing an error:
error: unknown format "uuid" ignored in schema at path "#/items/properties/uuid"
Shouldn't the ajv-formats
plugin be enabled by default? Because right now it means ajv-cli
cannot validate a json schema out of the box according to the json schema spec.