We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a requirement to generate @Valid annotation for all generated DTO files at field level based on my Spec.
Created spec as below.
AccountDetailsRequestBody: type: object additionalProperties: false x-field-extra-annotation: "@javax.validation.Valid" properties: payload: type: object x-field-extra-annotation: "@javax.validation.Valid" additionalProperties: false properties: accountDetail: $ref: '#/components/schemas/AccountDetail'
but while generating JAVA DTO file using below command, its not generating this @Valid annotation at field level.
java -Dmodels -DmodelDocs=false -jar openapi-generator-cli.jar generate -i ./input/system-api/common/indicators.yaml -g spring -o output-model/system-api -t ./spring-boot-lombok-actuator -p useActuator=true,useLombok=true,actuatorPath=/actuator
tried with latest version as well such as 6.0.0 and 7.9.0
As confirmed by another thread, its implemented in 6.0.0 itself. but not working.
Main objective is to avoid adding @Valid annotation for all nested objects to perform schema validations for request body object.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a requirement to generate @Valid annotation for all generated DTO files at field level based on my Spec.
Created spec as below.
AccountDetailsRequestBody:
type: object
additionalProperties: false
x-field-extra-annotation: "@javax.validation.Valid"
properties:
payload:
type: object
x-field-extra-annotation: "@javax.validation.Valid"
additionalProperties: false
properties:
accountDetail:
$ref: '#/components/schemas/AccountDetail'
but while generating JAVA DTO file using below command, its not generating this @Valid annotation at field level.
java -Dmodels -DmodelDocs=false -jar openapi-generator-cli.jar generate -i ./input/system-api/common/indicators.yaml -g spring -o output-model/system-api -t ./spring-boot-lombok-actuator -p useActuator=true,useLombok=true,actuatorPath=/actuator
tried with latest version as well such as 6.0.0 and 7.9.0
As confirmed by another thread, its implemented in 6.0.0 itself. but not working.
Main objective is to avoid adding @Valid annotation for all nested objects to perform schema validations for request body object.
The text was updated successfully, but these errors were encountered: