I use openapi-generator-maven-plugin:7.1.0
with properties:
<interfaceOnly>true</interfaceOnly>
<skipDefaultInterface>true</skipDefaultInterface>
<useSpringBoot3>true</useSpringBoot3>
<useSpringController>true</useSpringController>
<openApiNullable>false</openApiNullable>
<performBeanValidation>true</performBeanValidation>
It generates only @NotNull
annotation in model, for required String field in spec,
I have no idea how to generate @NotBlank
also.
So at this point openapi-generator doesn't use @NotBlank and @NotEmpty annotations, only @NotNull. But it can be done via:
see https://stackoverflow.com/a/71526062/2728393