-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Good documentation on applying swagger inheritance in JAX-RS endpoints. #851
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
Labels
Comments
Also, does swagger generate these annotations when one does codegen of yaml -> JAX-RS? |
frantuma
added a commit
to swagger-api/swagger-samples
that referenced
this issue
Mar 11, 2016
Refs swagger-api/swagger-core#851 - add composition sample
This was added by swagger-api/swagger-samples#53 |
Thanks a lot for adding this, and for all your hard work on this project. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initially I expected swagger to pass class binding information to the Jackson deserializer, since swagger allows for annotating all required inheritance information to be supplied. It took me quite a while to figure out that I needed to add @JsonTypeInfo annotations...
It would have saved me days of my time if there would at least have been an example for polymorphism in the PetStore examples, or anything of sorts. Judging from the amount of unanswered questions on stackoverflow, and lack of examples/implementations I could find online, im not the only one.
Is it an idea to add some basic inheritance to the petstore example?
Suggestion for the petstore pet model:
The text was updated successfully, but these errors were encountered: