Bug Report Checklist
Description
#17622 adds more lombok support, which is great!
As soon as any lombok annotation is included, every required field on the models now gets annotated with @lombok.NonNull
which adds a null check where none was present before (i.e. with 7.2.0) when using for example a lombok constructor or builder.
As such a breaking change which suddenly starts throwing NullPointerExceptions where none were thrown before it would be nice to have a way to configure such behaviour.
openapi-generator version
7.3.0-SNAPSHOT
OpenAPI declaration file content or url
The yaml configuration
The generated sample
Generation Details
bin/config-generate-samples.sh bin/configs/spring-boot-lombok-tostring.yaml
Steps to reproduce
Include any lombok class in additionalModelTypeAnnotation, mark a model attribute as required
Suggest a fix
I would suggest the use of a configuration possibility similar to useBeanValidation, either to disable @lombok.NonNull, or to choose which library is used for such Nullable/NonNull annotations. What are your thoughts?
Bug Report Checklist
Description
#17622 adds more lombok support, which is great!
As soon as any lombok annotation is included, every required field on the models now gets annotated with @lombok.NonNull
which adds a null check where none was present before (i.e. with 7.2.0) when using for example a lombok constructor or builder.
As such a breaking change which suddenly starts throwing NullPointerExceptions where none were thrown before it would be nice to have a way to configure such behaviour.
openapi-generator version
7.3.0-SNAPSHOT
OpenAPI declaration file content or url
The yaml configuration
The generated sample
Generation Details
bin/config-generate-samples.sh bin/configs/spring-boot-lombok-tostring.yaml
Steps to reproduce
Include any lombok class in
additionalModelTypeAnnotation, mark a model attribute as requiredSuggest a fix
I would suggest the use of a configuration possibility similar to
useBeanValidation, either to disable@lombok.NonNull, or to choose which library is used for such Nullable/NonNull annotations. What are your thoughts?