You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
After this change #14822 now when adding <additionalModelTypeAnnotations>@lombok.experimental.SuperBuilder</additionalModelTypeAnnotations> compilation might be broken
If object have some required parameters then everything works fine, but as soon as you have object without required parameters you are getting model where only "all args constructor" is present(generated by lombok) and there is no "no arg constructor"
Before this change I usually configured my models with <additionalModelTypeAnnotations>@lombok.AllArgsConstructor;@lombok.NoArgsConstructor;@lombok.experimental.SuperBuilder</additionalModelTypeAnnotations> so at the end I got "all args" & "no args" constructor generated by lombok
openapi-generator version
6.5.0-SNAPSHOT (not released yet)
OpenAPI declaration file content or url
any model with at least one property and there are no required properties
add option generatedRequiredParametersConstructor=false. By default it should be false, because this new option will broke compilation as it's in my case
@alucas could you please implement this? Please ping if you have no time, then I can pick this one
The text was updated successfully, but these errors were encountered:
Broken generatedConstructorWithRequiredArgs for @lombok.NoArgsConstructor"
error: constructor TestRequest() is already defined in class CallbackRequest
id = "org.openapi.generator", version = "7.9.0"
"additionalModelTypeAnnotations" to "@lombok.AllArgsConstructor @lombok.NoArgsConstructor",
"generatedConstructorWithRequiredArgs" to "false"
Bug Report Checklist
Description
After this change #14822 now when adding
<additionalModelTypeAnnotations>@lombok.experimental.SuperBuilder</additionalModelTypeAnnotations>
compilation might be brokenIf object have some required parameters then everything works fine, but as soon as you have object without required parameters you are getting model where only "all args constructor" is present(generated by lombok) and there is no "no arg constructor"
Before this change I usually configured my models with
<additionalModelTypeAnnotations>@lombok.AllArgsConstructor;@lombok.NoArgsConstructor;@lombok.experimental.SuperBuilder</additionalModelTypeAnnotations>
so at the end I got "all args" & "no args" constructor generated by lombokopenapi-generator version
6.5.0-SNAPSHOT (not released yet)
OpenAPI declaration file content or url
any model with at least one property and there are no required properties
Generation Details
Steps to reproduce
Related issues/PRs
#14822
Suggest a fix
add option
generatedRequiredParametersConstructor=false
. By default it should be false, because this new option will broke compilation as it's in my case@alucas could you please implement this? Please ping if you have no time, then I can pick this one
The text was updated successfully, but these errors were encountered: