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

add schema validation support for more json-schema version refs (closes #2354) #4390

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

philosomniac
Copy link

  • Breaking change?

What changes did you make?
Issue #2354 mentions that attempting to publish a message with schema validation will fail using a schema that references json-schema version draft-07. According to the Ajv docs, different json-schema versions (as referenced by the $schema property) require using different modules in Ajv. The current code always uses the draft-2020-12 module, which will throw errors if an earlier version of json-schema is referenced in the $schema property--so I added some code that will select the correct Ajv module based on the $schema property.

Is there anything you'd like reviewers to focus on?
This is my very first open-source contribution--please be gentle! :)

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)
As requested--my favorite dog breed :)

@philosomniac philosomniac requested a review from a team as a code owner February 28, 2024 21:42
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello there philosomniac! 👋

Thank you and congrats 🎉 for opening your first PR on this project! ✨ 💖

We will try to review it soon!

@Haarolean
Copy link
Contributor

Hi @philosomniac, as this repo is no longer maintained (#4255), can I ask you to raise the same PR into our new repo (https://github.com/kafbat/kafka-ui)? Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants