Skip to content

"oneOf" from superclass schema is propagated to subclasses unexpectedly #3054

Discussion options

You must be logged in to vote

Hi @YoungHoney,

This is an issue I am familiar with, it has been discussed here. It has to do with how swagger-core introspects. It both parses the @JsonSubTypes annotation but also the @Schema annotation, meaning that the generated OpenApi object tries to express two different ways of representing polymorphism.

There are several different solutions to this, with the main thing being that you need to not have both annotations on the same object.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@YoungHoney
Comment options

Answer selected by YoungHoney
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants