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

Produce with String-only JSON Schema fails #1658

Open
ddavidyuk opened this issue Jan 22, 2024 · 0 comments
Open

Produce with String-only JSON Schema fails #1658

ddavidyuk opened this issue Jan 22, 2024 · 0 comments

Comments

@ddavidyuk
Copy link

We have the following JSON schema set up for the record keys:

{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "type": "string",
  "minLength": 1
}

This describes non-empty strings. When we select this schema in the Key Schema drop-down of the Produce to topic screen and then for the Key enter a quoted string (e.g. "abc" - this conforms to the JSON Schema above), AKHQ fails with an error.

The root cause seems to be that only JSON Objects are expected:
https://github.com/tchiotludo/akhq/blob/dev/src/main/java/org/akhq/modules/schemaregistry/JsonSchemaSerializer.java#L35

Would it be possible to add support for any JSON value, not just JSON Objects?

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

No branches or pull requests

1 participant