Open stefalce opened 3 years ago
I've done more tests, I found a problem in cstring. Since it hasn't 'type: "array"' it validates all non array data as true. Also currently json like ["container"]
or []
is considered valid (at least in newer versions), ajv strict mode is useful as it requires to state minItems. Schemas could also be rewritten using the const keyword instead of the single item enum.
Please propose PRs for fixes
Here are some things I didn't find cool about json schemas:
Int
is out of the documentation but its schema is still present.The strict mode error doesn't mean much except the schema has something unclear or meaningless. Validation for strict mode or not is identical. For example in the container schema there is a non necessary
additionalItems
which annoyingly throws an error if strict mode is on.