Skip to content
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

Extracting common properties #756

Closed
pkriens opened this issue Aug 9, 2016 · 3 comments
Closed

Extracting common properties #756

pkriens opened this issue Aug 9, 2016 · 3 comments
Labels
re-use: traits/merges Selective or modified re-use

Comments

@pkriens
Copy link

pkriens commented Aug 9, 2016

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
Copy link

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
Copy link
Author

pkriens commented Aug 18, 2016

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
re-use: traits/merges Selective or modified re-use
Projects
None yet
Development

No branches or pull requests

3 participants