-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
"bidnings.kafka.key" is transformed even if schema is defined as JSON Schema #139
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
@magicmatatjahu this is a side effect of the basic support of Avro definition in the key bindings, described here. Should we wait for any progress on your proposal ? or find a workaround to fix this issue like parsing the entire structure to detect if it is a avro or json definition ? |
@M3lkior Sorry for delayed response, I was on vacation.
I understand, thanks. I don't know when that proposal will be accepted (or even accepted), so I won't count on that. As I see we can check if given schema is avro schema like here https://github.com/asyncapi/avro-schema-parser/blob/master/to-json-schema.js#L271 and make simple try catch for that: try {
validateAvroSchema(message.bindings.kafka.key);
} catch(e) {
// "break" rest of the function
} but we need to remember that then only JSON Schema will be then accepted. WDYT? |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
Describe the bug
bidnings.kafka.key
field is transformed byavro-parser
even if schema is defined as JSON Schema, but it should be only when is defined as Avro Schema.How to Reproduce
Paste to the Studio example spec with
bindings.kafka.key
:and you will see:
but it should be (I changed
kafka.key
tokafka.test
):The text was updated successfully, but these errors were encountered: