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

[BUG] [JAVA] the non-parametric constructor in DTOs is wrongly marked as deprecated #15478

Closed
vlavasa opened this issue May 11, 2023 · 0 comments · Fixed by #15512
Closed

[BUG] [JAVA] the non-parametric constructor in DTOs is wrongly marked as deprecated #15478

vlavasa opened this issue May 11, 2023 · 0 comments · Fixed by #15512

Comments

@vlavasa
Copy link

vlavasa commented May 11, 2023

From openapi-generator version 6.5.0 in Java DTO classes there are all default parameterless constructors now marked as Deprecated, and there are added new parametric constructor with fields defined in OpenAPI as required

It's a very bad idea for the following reasons:

  1. if the company uses quality controls, all existing code is now reported as using the deprecated method

  2. code using a parametric constructor as opposed to builder methods is less resistant to changes in the OpenAPI definition, such as changing the attribute obligation and especially changing its order!

In addition, the parametric constructor must remain in the code forever, because the json parser needs it, so marking it as deprecated is clearly wrong!
Please remove this nonsense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant