-
Notifications
You must be signed in to change notification settings - Fork 96
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
Fix generated method toString with inheritance. #1298
Fix generated method toString with inheritance. #1298
Conversation
About toString: as I see, this is bug in openapi-generator lib. About no-args constructor: need it for jackson-databind, because jackson by default use no-args constructor or trying to find method with |
bbbbdd0
to
df6feb4
Compare
df6feb4
to
ac0840e
Compare
ac0840e
to
a6ec69a
Compare
@andriy-dmytruk Hi! Could you revie wit? And after this PR we can finalize next release |
@@ -382,9 +387,9 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE | |||
@Override | |||
public String toString() { | |||
return "{{classname}}(" | |||
{{#allVars}} | |||
{{#vendorExtensions.allVars}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should fix the allVars
property instead of creating a new property in vendorExtensions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -131,6 +131,11 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE | |||
{{/vars}} | |||
|
|||
{{#requiredPropertiesInConstructor}} | |||
{{^micronaut_serde_jackson}} | |||
public {{classname}}() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better for constructor to be private or package-private. Otherwise the point of required properties is lost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
474876f
to
146b056
Compare
Also removed |
Add no args constructor for POJOs, when use jackson-databind
146b056
to
916bf09
Compare
Add no args constructor for POJOs, when use jackson-databind.