-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Add support for Avro Schemas #466
Comments
I had a quick look at Avro Schemas. It looks like it should be straightforward to convert most Avro schemas into a schema to use in a Swagger 2.0 spec. Only Adding generation of Avro Schemas could be interesting for swagger-codegen, but I don't see what "support" for Avro you are requesting in the core Swagger spec. PS: I'm not a core contributor of Swagger |
By "support" I mean (1) the ability to embed an Avro Schema in the Swagger specification instead of embedding a JSON-Schema definition, and (2) support for |
(1) does not seem in the spirit of Swagger. You can still do it using vendor extensions in a schema definition, but most generation tools will not support your extension. |
(1) We're actually considering the option to use alternative data modeling schemes in the future. Since I don't know Avro except by name, I cannot address the concerns about the |
@webron |
That's why |
Parent: #586. |
@dolmen can you please expand on what you mean by "using vendor extensions" to support Avro schemas in swagger? It is the unions that make the difference here. Otherwise, everything from a swagger generated schema is likely identical to the Avro schema. We need to support polymorphism and it would be nice if swagger would generate an accurate representation of our actual schema. It sounds like I will have to write such a generator myself, so any pointers would be appreciated. |
@handrews @lornajane this ticket should be closed as mentionned the topic of union / polymorphism is already been solved by leveraging Json Schema capability |
This may also fall under Moonwalk's separation of concerns and decoupling from specific schema systems. So folks can join the discussions there if interested. |
At Pearson Education, we have a preference for expressing data models using Avro Schemas. Avro schemas have some benefits over JSON schema. See, for example, Jon Zuanich's blog.
Ideally, we would like the Swagger specification to offer a choice in the way that the data model is expressed. As a starting point, one could choose either JSON Schema or Avro Schema.
The text was updated successfully, but these errors were encountered: