Closed magicmatatjahu closed 1 year ago
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.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
@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.
this is a side effect of the basic support of Avro definition in the key bindings, described https://github.com/asyncapi/avro-schema-parser/pull/77. Should we wait for any progress on https://github.com/asyncapi/spec/issues/622 ? or find a workaround to fix this issue like parsing the entire structure to detect if it is a avro or json definition ?
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 :sleeping:
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 :heart:
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
):