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

Support for polymorphism missing ("allOf")? #29

Open
nakamorichi opened this issue Oct 18, 2016 · 2 comments
Open

Support for polymorphism missing ("allOf")? #29

nakamorichi opened this issue Oct 18, 2016 · 2 comments

Comments

@nakamorichi
Copy link
Contributor

nakamorichi commented Oct 18, 2016

Getting "Error: Unrecognized schema type: undefined" when OpenAPI definition contains "allOf"-type polymorphism.

Can be reproduced with the polymorphism example at http://swagger.io/specification.

How about using a parser such as swagger-parser for validating the spec file and resolving the definitions?

@briananderson1222
Copy link
Collaborator

@Kitanotori PRs are welcome.

@LGLC
Copy link

LGLC commented Dec 20, 2017

Thanks so much for the work on this! I've just added in a single comment as we need to move one line of code and then it works perfectly!

On PR but I'll put it here anyway:

Line 247 (var required = fullObject.required || [];) should be moved to line 251 (i.e. after processPolymorphic runs if the definition is polymorphic) otherwise we're not adding in the merged required fields.

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

Successfully merging a pull request may close this issue.

3 participants