Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: jackson module support @JsonTypeInfo.defaultImpl #279

Merged
merged 1 commit into from
Aug 21, 2022

Conversation

CarstenWickner
Copy link
Member

When the Jackson module's built-in subtype resolution encounters a @JsonTypeInfo´ annotation with the defaultImpl` attribute on it, then that particular subtype is not required to include the designated type property.

From a schema point of view, the assumption is, that some other properties will make it distinct from different subtypes, in order to avoid "false positives" (e.g., another subtype where the type property was forgotten). That is then the responsibility of the schema creator.

Resolves #278, where this change was suggested by @eleftherias.

@CarstenWickner CarstenWickner added the enhancement New feature or request label Aug 20, 2022
@CarstenWickner CarstenWickner self-assigned this Aug 20, 2022
@CarstenWickner CarstenWickner merged commit c525695 into main Aug 21, 2022
@CarstenWickner CarstenWickner deleted the jackson-typeinfo-defaultimpl branch August 21, 2022 04:10
@eleftherias
Copy link

Looking forward to this feature!
Do you know when the next release will be available @CarstenWickner?

@CarstenWickner
Copy link
Member Author

I can trigger it in a few hours.
Will let you know then.

@CarstenWickner
Copy link
Member Author

Release of v4.26.0 including this change is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants