You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In java, while generating polymorphic deserialization based on sub types, there's an option to specify default implementation class in case none of the mapping matches
That seems to be missing while generating from openapi
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(
value = "error_code", // ignore manually set error_code, it will be automatically generated by Jackson during serialization
allowSetters = true // allows the error_code to be set during deserialization
)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "error_code", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = ABCErrorInformation.class, name = "ABC"),
@JsonSubTypes.Type(value = XYZErrorInformation.class, name = "XYZ")
})
public class ErrorInformation {
private String errorCode;
private String message;
}
Describe the solution you'd like
A property to specify default implementation in case none of the sub type matches in discriminator mentioned
Is your feature request related to a problem? Please describe.
In java, while generating polymorphic deserialization based on sub types, there's an option to specify default implementation class in case none of the mapping matches
That seems to be missing while generating from openapi
Sample openapi spec
Describe the solution you'd like
A property to specify default implementation in case none of the sub type matches in discriminator mentioned
This should generate java class with this annotation
The text was updated successfully, but these errors were encountered: