Skip to content

Conversation

andrewbents
Copy link

fixes #796

resolves all subtype names instead of only the first one

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "kind")
@JsonSubTypes({
@JsonSubTypes.Type(value = SubTypeDiscriminatedByName1.class, name = "SubType1"), // value from @JsonTypeName is used
@JsonSubTypes.Type(value = SubTypeDiscriminatedByName1.class, name = "SubType1"),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this one

this is probably a breaking change, since @JsonTypeName would no longer have priority over @JsonSubTypes.Type, and all typenames would be included

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@JsonSubTypes.Type names are neglected, only the first name is emitted

1 participant