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-7037] schema registry json schema: fixes for some compatiblity bugs #23172

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #23101

future proof if some future json schema dialect appears

(cherry picked from commit 339d4fd)
only a name change. lambda is_array -> is_tuple, is_tuple is the
opposite of is_array. less confusing in the context of is_array_superset

(cherry picked from commit 348f004)
the function was wrong, if the property has a "default" field

the correct formulation is:
is superset
  if newer["required"] has all the elements of older["required"] or more
  or
  every x element in older["reuired"] NOT in newer["required"], has a
  default value in older["properties"][x]

chenged the whole function to just check older["required"] for this
property

(cherry picked from commit f81507b)
in the case of tuples with different size of elements, excess elements
needs to be compatible with the other schema "additionalItems".
previously, this property was cheked only for excess elements in newer

(cherry picked from commit b6201a1)
the legacy software does not directly check patternProperties.
this seems likely an oversight, but for now this check is removed

(cherry picked from commit d67bbcc)
@vbotbuildovich vbotbuildovich added this to the v24.2.x-next milestone Sep 2, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Sep 2, 2024
@andijcr andijcr modified the milestones: v24.2.x-next, v24.2.4 Sep 2, 2024
@andijcr andijcr merged commit 9c2e364 into redpanda-data:v24.2.x Sep 3, 2024
19 checks passed
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.

2 participants