OpenAPI generator:configure lombok with Builder/Builder.Default

Viewed 594

I am using openapi generator (5.4.0) with gradle.

It is configured with spring generator name, and added lombok configOptions.

additionalModelTypeAnnotations : "@lombok.Builder; @lombok.NoArgsConstructor;@lombok.AllArgsConstructor;"

As some fields are nullable, I get a compile warning:

 warning: @Builder will ignore the initializing expression entirely. 
If you want the initializing expression to serve as default, 
add @Builder.Default.

Is there anyway to rectify this without adding @Builder.Default to the mustache pojo template?

Thanks, B

0 Answers
Related