Skip to content
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] [CORE-6750] schema registry exclusiveMinumum/exclusiveMaximum double support #22658

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #22644

with the passage to jsoncons for schema validation, this error message
changed

(cherry picked from commit 5183167)
…m: bool

exclusiveMinimum/Maximum in draft4 are booleans and defaults to false.
So this test case should pass:

160 +  {
161 +    .reader_schema
162 +    = R"({"type": "number", "maximum": 10, "exclusiveMaximum": false})",
163 +    .writer_schema = R"({"type": "number", "maximum": 10})",
164 +    .reader_is_compatible_with_writer = true,
165 +  },

this commit is a fix to make it work

(cherry picked from commit 4fcd586)
from draft6, exclusiveMinimum/Maximum are no longer booleans but
doubles.

add support for this if both schemas are >=draft6. mixed comparison
(boolean/double or vice-versa) are technically possible, by using the
minimum/maximum values, but are still rejected

(cherry picked from commit b05bc0a)
@vbotbuildovich vbotbuildovich added this to the v24.2.x-next milestone Jul 30, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jul 30, 2024
@andijcr
Copy link
Contributor

andijcr commented Jul 30, 2024

@michael-redpanda michael-redpanda merged commit 450ec7e into redpanda-data:v24.2.x Jul 31, 2024
15 of 19 checks passed
@piyushredpanda piyushredpanda modified the milestones: v24.2.x-next, v24.2.3 Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants