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
Problem/Issue:
I have a class annotated with @JsonTypeInfo to define a wrapper property. But it seems it's not being honored when generating the spec yaml/json. This is a mismatch with the actual API response.
@Schema(name ="ErrorResponse")
@JsonTypeName(value ="error")
@JsonTypeInfo(include =JsonTypeInfo.As.WRAPPER_OBJECT, use =JsonTypeInfo.Id.NAME)
data classErrorResponse(
valmessage:String,
valdetails:List<String>? = null
)
Problem/Issue:
I have a class annotated with
@JsonTypeInfo
to define a wrapper property. But it seems it's not being honored when generating the specyaml
/json
. This is a mismatch with the actual API response.The produced output is
The expected output should be
Solution:
When resolving the schema of the classes, the resolver should honor the
@JsonTypeInfo
,@JsonTypeName
annotationAlternatives:
Right now the only solution I see is to add an additional wrapper class to get it to generate accurate
yaml
/json
.The text was updated successfully, but these errors were encountered: