OAI / OpenAPI-Specification

The OpenAPI Specification Repository
https://openapis.org
Apache License 2.0
28.91k stars 9.07k forks source link

Extracting common properties #756

Closed pkriens closed 4 months ago

pkriens commented 8 years ago

Many objects contain description, title/summary, deprecated, externalDocs, example. It would make the spec a lot more readable if these were filtered out through traits or inheritance.

zeeshanejaz commented 8 years ago

Here is a long-shot, are you implementing an AST for swagger? If so, sharing that here (as a class diagram) will help everyone.

pkriens commented 8 years ago

I am creating a Java API for swagger and found that there seems a lot of similar concepts specified multiple times. I like to factor that out of course with inheritance and traits.

handrews commented 4 months ago

This has largely been done in the 3.1 schema, as JSON Schema draft 2020-12 has more flexible re-use constructs.

Also, in 3.1, summary and description can be overridden in the Reference Object.

Given the age of this and how much things have changed since 2.0, I'm going to close this, but do feel free to open a new issue based on the current state of the spec if you think there is work of this sort to be done now. Or join the discussions for 4.0 in the OAI/sig-moonwalk repository, where we can make more substantial changes to the format.