Skip to content

chore: deprecate parameterized model constructors - #2103

Open
ashwaniarya-adyen wants to merge 1 commit into
mainfrom
chore/deprecate-constructors
Open

ashwaniarya-adyen wants to merge 1 commit into
mainfrom
chore/deprecate-constructors

Conversation

@ashwaniarya-adyen

Copy link
Copy Markdown
Contributor

Summary

  • Deprecate the parameterized @JsonCreator constructors on generated models in favor of the no-args constructor and fluent builder pattern.
  • Marking these constructors as @Deprecated guides consumers to use the no-args constructor (new Model()) and fluent builder methods instead

Changes

  • Added @Deprecated annotation and @deprecated Javadoc to the @JsonCreator constructor in templates-v7/libraries/jersey3/pojo.mustache.

@ashwaniarya-adyen
ashwaniarya-adyen requested a review from a team as a code owner October 29, 2026 14:59
@ashwaniarya-adyen ashwaniarya-adyen added the Documentation Indicates the PR updates documentation and doesn't involve code. label Oct 29, 2026
@ashwaniarya-adyen ashwaniarya-adyen self-assigned this Oct 29, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the pojo.mustache template for Jersey 3 by adding a Javadoc explanation and a @Deprecated annotation to the @JsonCreator constructor, which is used for internal JSON deserialization of read-only properties. There are no review comments, and I have no feedback to provide.

@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

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

Labels

Documentation Indicates the PR updates documentation and doesn't involve code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant