-
Notifications
You must be signed in to change notification settings - Fork 593
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
[v24.2.x] sr/json: support drafts 201909 and 202012 with jsoncons #22316
Merged
michael-redpanda
merged 5 commits into
redpanda-data:v24.2.x
from
vbotbuildovich:backport-pr-21473-v24.2.x-724
Jul 25, 2024
Merged
[v24.2.x] sr/json: support drafts 201909 and 202012 with jsoncons #22316
michael-redpanda
merged 5 commits into
redpanda-data:v24.2.x
from
vbotbuildovich:backport-pr-21473-v24.2.x-724
Jul 25, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is needed because the next commit introduces jsoncons for validating json schemas against their draft's metaschema and jsoncons does not have support for draft 5. Other schema registries do not support draft 5 either, so it is unlikely that we would have customers that need to use draft 5 explicitly (and can't just use the largely equivalent draft 4). (cherry picked from commit 3cd6c59)
* Add an error test case for a schema that is invalid for the specific draft's metaschema only. * Add an assertion that invalid schemas do raise an error. (cherry picked from commit 8ad6b26)
To be used in the next commit. (cherry picked from commit ada73ff)
rapidjson does not support validating schemas above draft 5, so previously we have been rewriting newer schemas in draft 4's metaschema in order to validate them. This is error prone and gets increasingly complicated for later drafts. Instead, this commit pulls in the jsoncons library which has support for validing schemas in drafts 4, 6, 7, 2019-09, 2020-12, which covers our expected use cases. (cherry picked from commit adbe29d)
This adds support for validating schemas of the 2019-09 and 2020-12 drafts. The assertion keywords introduced in these drafts are not yet validated for compatibility across successive schema versions. The implementation of these keywords is going to be implemented later. https://json-schema.org/draft/2019-09/release-notes https://json-schema.org/draft/2020-12/release-notes (cherry picked from commit ff9305b)
vbotbuildovich
requested review from
rpdevmp and
pgellert
and removed request for
a team
July 25, 2024 09:20
BenPope
approved these changes
Jul 25, 2024
/dt |
michael-redpanda
merged commit Jul 25, 2024
735bcf0
into
redpanda-data:v24.2.x
15 of 19 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of PR #21473