-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
[v3] Support multi format schemas in message headers #948
Comments
yeah, sounds like |
I vote for keep headers to be only async-api schema formated. To keep it simple. I see no benefit from defining header for example as avro. |
But the spec now says they allow multi-format schemas https://github.com/asyncapi/spec/blob/next-major-spec/spec/asyncapi.md#fixed-fields-16. |
Ok, my memories slowly come back. I guess Fran brought an reasons that required non ansycapi-schema as header. What i wanted to say is: Schema MUST be of type "object". |
Not just wording. As I mentioned in the issue description, that statement goes further as it's in the messageObject JSON Schema https://github.com/asyncapi/spec-json-schemas/blob/next-major-spec/definitions/3.0.0/messageObject.json#L21-L27 |
I think we should leave the sentence
We should be able to support, at least, Avro because that's what the majority of the Kafka folks are using. Making them write the same information in JSON Schema just to use it in AsyncAPI is not fair. |
Sounds like a more generic term, also not tied to JSON Schema, which is the intention.
I would say we must support all of the schema formats anyway. This also simplifies the schemas and tooling IMHO. No special behavior or exceptions when treating schemas. |
FYI, asyncapi/spec-json-schemas#370 got merged and support for all multiple formats is also included for headers. If there is a strong reason to revert that, please feel free to say it. Otherwise, if all agree, and after merging #952, we could close this issue . |
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 ❤️ |
Description
The current v3 spec mentions that the Message Object headers must be of type "object". Literally says:
Since the introduction of the support of multi-format schemas, message headers also support different schema formats.
Then, in my head, reading the sentence
Schema MUST be of type "object".
sounds confusing to me, especially for formats like Avro, where (afaik) there is no such type butrecord
iirc.This constraint is also in place in the AsyncAPI JSON Schema documents describing the message object. See https://github.com/asyncapi/spec-json-schemas/blob/next-major-spec/definitions/3.0.0/messageObject.json#L21-L27
Is that restriction in place with the purpose of limiting and simplifying what a header looks like? Shall we keep it and update it according to different possible shapes depending on the format? Or rather, after the recent changes, should we get rid of it?
Relates to #622
cc @GreenRover @dalelane @derberg @jonaslagoni @fmvilas
The text was updated successfully, but these errors were encountered: