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
I am using swagger-codegen-maven-plugin version: 2.4.8
If discriminator and property exists with the same name. Spring rest response has duplicated fields.
it is generated: @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true )
JsonTypeInfo.As.PROPERTY is always generated(it is not parametrized anyway) It would be better to generate in such case: @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "@type", visible = true )
So fields won't be duplicated in rest response.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
I am using swagger-codegen-maven-plugin version: 2.4.8
If discriminator and property exists with the same name. Spring rest response has duplicated fields.
for such definition:
"Pet": { "type": "object", "required": [ "name", "petType" ], "properties": { "name": { "type": "string" }, "petType": { "type": "string" } }, "discriminator": "petType", }
it is generated:
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true )
JsonTypeInfo.As.PROPERTY is always generated(it is not parametrized anyway) It would be better to generate in such case:
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "@type", visible = true )
So fields won't be duplicated in rest response.
The text was updated successfully, but these errors were encountered: