[JavaSpring] Bean Validation with Optional data type
Created by: falaura
Description
When generating code from a .yaml file using bean validation, e.g. maxLength=5, and with useOptional set true the generated code results in @Size(max=5) Optional<String> parameter
instead of Optional<@Size(max=5) String> parameter
.
openapi-generator version
4.1.3
OpenAPI declaration file content or url
Command line used for generation
openapi-generator generate -g spring -i api.yaml --additional-properties=useOptional=true
Steps to reproduce
Generate files by using command line command. The described problem is found in generated ThingsApi.java
Suggest a fix/enhancement
Changes in the corresponding queryParams.mustache
.