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

when using allOf swagger-ui ignores parent schema for display #1306

Closed
paulhill opened this issue May 22, 2015 · 3 comments
Closed

when using allOf swagger-ui ignores parent schema for display #1306

paulhill opened this issue May 22, 2015 · 3 comments

Comments

@paulhill
Copy link
Contributor

Swagger uses allOf to denote inheritance to support polymorphism but swagger-ui doesn't take it into account. It should show either the parent schema with some kind of indication it is the parent, or just merge the attributes so the model displayed correctly represents what is required.

@paulhill
Copy link
Contributor Author

https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#models-with-polymorphism-support

e.g. using the above example, if you reference Cat as the response schema it won't include "name" in the displayed schema.

@paulhill
Copy link
Contributor Author

http://editor.swagger.io/ does an ok job of listing the parent schema

@webron
Copy link
Contributor

webron commented May 22, 2015

@paulhill - long time! allOf is known to be not supported yet. Please follow swagger-api/swagger-js#188.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants