-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema validation with remote specs #16
Comments
Thanks for the kind words, @utrack! :-) I myself used only definitions inside a single schema file. (A hand-written Swagger API description) I looked at it and had to fix two problems:
Once you upgrade to 14.0.0, you'll be able to validate your data by specifying all schemas on the command line:
The schemas can be passed by a single Sub-schemas aren't loaded automatically, because they are passed to the validator as schema content. Not as paths to files with the schemas. There's no concept of a base and relative URLs in AJV, because the original paths are lost. However, the command-line script knows, what were the paths of schema files. It could load the schemas and if it detects a |
* A schema can be a string|object or an array pf them. * The main schema, if there is such, should be passed as the first one to be immediately compiled. * Fix multivalue argument parsing to accept both comma-delimited items and multiple arguments. Unfortunately, data arguments have to be separated by "--". * Accept schemas either as strings or as already parsed objects. * Update the readme with the extended JSON Schema support.
…finition Upgrade AJV to the latest version and retain the previous AJV@6 to be able to suport JSON Schema draft 04. BREAKING CHANGE: The default environment recognises only JSON Schema drafts 06 and 07 automatically. Not 04 any more. The environment for JSON Schema drafts 04 has to be selected explicitly. Also, JSON Schema drafts 06 and 07 are handled by AJV@8 instead of AJV@6. It shouldn't make any difference, but the implementation is new and could perform a stricter validation.
Hi Ferdinand, thanks for maintaining this fork! Looks p awesome :)
Can you clarify how do I actually run the schema validation for me, please?
What I've got:
data JSON (example):
../json.schema/form.schema.json JSON:
Expected:
Actual:
I've tried setting the
json-schema
ref tohttps://json-schema.org/draft-07/schema
but the error for that was the same.The text was updated successfully, but these errors were encountered: