-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Support draft-04 (and other?) JSON schemas #493
Comments
We're currently in the process of restructuring the jsonschema code to accommodate multiple versions. The current focus is on Draft 2019-09, to be followed by 2012-12. I hadn't really thought about it, but I suppose adding 04 and 06 wouldn't be a big deal. |
make_json_schema on master now supports drafts 04 and 06, in addition to 07, 2019-09, and 2020-12. It will detect the appropriate schema using |
Amazing! I notice when validating the JSONPatch
Happy to provide a PR... |
@mtmorgan Feel free to submit a PR with cleaned up error messages, I agree with single quote consistency. The validation messages are mostly constructed in the file |
I notice that
fails to compile with error
No problem for |
@mtmorgan Should be fixed on master |
Trying to validate a JSON patch 'op' against the patch schema seems to result in an incorrect 'evaluationPath' with
producing in part
|
Thanks! That observation was very helpful. Should be fixed on master. |
I'm not sure the paths are correct yet? I see
but the |
I'm not sure either :-) Suspect they aren't. Anyway that one is a separate issue that should be fixed now on master. |
<!-- If your PR fixes issues, please note that here by adding "Fixes #NNNNNN." for each fixed issue on separate lines. --> Fixes danielaparker/jsoncons#502 Fixes danielaparker/jsoncons#501 Fixes danielaparker/jsoncons#499 Fixes danielaparker/jsoncons#496 Fixes danielaparker/jsoncons#493 Fixes danielaparker/jsoncons#490 <!-- If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/. --> <!-- If this PR updates an existing port, please uncomment and fill out this checklist: - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
<!-- If your PR fixes issues, please note that here by adding "Fixes #NNNNNN." for each fixed issue on separate lines. --> Fixes danielaparker/jsoncons#502 Fixes danielaparker/jsoncons#501 Fixes danielaparker/jsoncons#499 Fixes danielaparker/jsoncons#496 Fixes danielaparker/jsoncons#493 Fixes danielaparker/jsoncons#490 <!-- If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/. --> <!-- If this PR updates an existing port, please uncomment and fill out this checklist: - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
Describe the proposed feature
Currently, validation requires schemas following the 'draft-07' schema, but many schemas 'in the wild' are draft-04, an example relevant to jsoncon is JSON patch https://json.schemastore.org/json-patch.json.
What other libraries (C++ or other) have this feature?
I think many other libraries support, to one extent or another, draft-04
Include a code fragment with sample data that illustrates the use of this feature
leads to
Apparently the changes from 04 to 06 are minor and 07 is backward-compatible with 06.
I could develop a pull request, but likely there would be a lot of 'mentoring' ;) involved to make it worth-while.
The text was updated successfully, but these errors were encountered: