-
Notifications
You must be signed in to change notification settings - Fork 533
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
With a composed model (allOf), only set the model which holds a discriminator field as parent #245
Comments
After looking at the code, it seems difficult to do it in the parser because we only have the RefModel and not the ModelImpl and thus we don't know if it holds the discriminator. |
cbornet
added a commit
to cbornet/swagger-parser
that referenced
this issue
May 19, 2016
cbornet
added a commit
to cbornet/swagger-parser
that referenced
this issue
May 19, 2016
cbornet
added a commit
to cbornet/swagger-parser
that referenced
this issue
May 19, 2016
cbornet
added a commit
to cbornet/swagger-parser
that referenced
this issue
Jun 3, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As per swagger spec's definition of allOf, inheritance should only be used in the case the parent model has a discriminator field.
The current implementation is to set the first model as parent but this results in issues with generated code (see swagger-api/swagger-codegen#2096)
The text was updated successfully, but these errors were encountered: