-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
Avro specification inside AsycnApi file #1015
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. |
Hi @Lazzaretti ! v3 keeps the support for declaring an Avro schema without the need of a reference. The following example uses the one you linked but converted to v3 of the spec: asyncapi: 3.0.0
info:
title: Example with Avro
version: 0.1.0
channels:
example:
messages:
myMessage:
payload:
schemaFormat: 'application/vnd.apache.avro;version=1.9.0'
schema:
type: record
name: User
namespace: com.company
doc: User information
fields:
- name: displayName
type: string
- name: email
type: string
- name: age
type: int Regarding your statements:
And that's true. The point is that the
Note that the After clarifying this, I can understand it might create confusion for those coming from pervious versions. We could include a statement in the Schema Object saying something like "if you need support for other formats, please check the MultiFormat Schema Object instead" (but with nice words 😅 ). Do you think that will improve the readability and understanding of that matter @Lazzaretti ? |
Thanks for the great explanation @smoya ! |
That would be awesome! 🙌 Ping me if you need help with that. |
asyncapi#1015 Show a sample of how Avro scha is still suppored inline.
asyncapi#1015 Make it clear on how to use Avro and other non JSON Schema conform formats inline. Signed-off-by: Lazzaretti <[email protected]>
I'm unsure how, or if at all, Avro is supported inside the AsyncApi file or if you can only have it as a separate reference.
In version 2, I found examples of inline Avro definitions: https://github.com/asyncapi/avro-schema-parser?tab=readme-ov-file#usage
However, in version 3, I have not found any yet.
The specification states that for "Schema Object," you can only have JSON Schema Specifications.
and
https://www.asyncapi.com/docs/reference/specification/v3.0.0#schemaObject
Is the assumption correct that Avro is not supported inline?
-> If so, it would be great to write that explicitly.
-> If it is supported, an example would be great!
Describe the bug
Unclear behavior of how to add Avro schemas to AsycnApi .
To Reproduce
Read the spec: https://www.asyncapi.com/docs/reference/specification/v3.0.0
Additional context
AsyncAPI version 3.0.0
The text was updated successfully, but these errors were encountered: