-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Open
Labels
Description
Description
we use the spring generator with the below config
<openapi.producer.generator.config.additionalModelTypeAnnotations.default>
@com.fasterxml.jackson.annotation.JsonIgnoreProperties(ignoreUnknown = true)
@lombok.Builder(toBuilder = true)
@lombok.NoArgsConstructor
@lombok.AllArgsConstructor
</openapi.producer.generator.config.additionalModelTypeAnnotations.default>
to generate constructors & builders.
WIth the new generatedConstructorWithRequiredArgs parameter the build fails because lombok has already generated the constructor. Then the generator attempts to do the same and fails with a constructor already exists error.
openapi-generator version
6.6.0
Suggest a fix
I think it would be best to identify already generated constructors and just ignore them, instead of failing, since ultimately there already is a suitable constructor and hence the goal is achieved.
Not Duplicate
please note I am aware of #15494 and we have applied this workaround, but in my opinion this should work out of the box. Users shouldn't have to configure another property to work around this.
Reactions are currently unavailable