-
-
Notifications
You must be signed in to change notification settings - Fork 590
cli.py should check_schema before using it. #208
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
Comments
Yup, agreed. Any chance you'd be interested in a PR? |
Not really. There are several different ways the issue could be resolved and I don't think it's my place to determine which of those methods is correct, especially since I have no particular understanding of this project, or more than a passing familiarity with Python. For my purpose because I am calling the validator from other code as well I have changed the Going forward I think I am likely to abandon JSON schema in general anyway since I need more expressive power, meaning either XSD1.1 or a Lua DSL. |
Fixed in #297 |
86f965e Merge pull request #209 from json-schema-org/refactor-format f056cb7 fix: incorrect relative-json-pointer test, closes #208 814eb16 refactor: split format.json to multiple files, closes #162 870b9f7 Merge pull request #207 from json-schema-org/draft-7-ajv 3d9830a feat: test draft-7 with Ajv 9ce7b4c Merge pull request #200 from handrews/draft-07 cf6e663 Apparently descriptions must be < 60 chars 1042cd6 Update draft coverage information 0680b46 Restore regex format test from draft-03 f58637d Basic relative json pointer tests for format 1b43ffa Partial IRI and IRI-reference test suite 9b020b8 Add idn-email and idn-hostname format tests ca342c9 Add tests for "date" and "time" formats 0d64501 Tests for contentMediaType and contentEncoding ea357f3 Update draft coverage information 321db9a Tests for if, then, and else keywords dedd3f1 Unmodified copy of draft6 tests to draft7 git-subtree-dir: json git-subtree-split: 86f965e53dda0b6c57e70ddd726243e1e061cf84
The documentation suggests "first verify that the provided schema is itself valid, since not doing so can lead to less obvious error messages and fail in less obvious or consistent ways" but the command line utility does not follow this advice.
If it is desirable to not recheck the schema on every run for performance reasons related to scripting it would be possible to instead check the schema just when the cli tool is called with no instances (which currently appears to be effectively a no-op), but I would prefer it on every run (since multiple instances can be provided in a single execution).
The text was updated successfully, but these errors were encountered: