Fix validation constraints for parameters in request body of form request are not generated (at least with Spring Boot generator)#21749
Conversation
|
Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors. Let me know if you need help fixing it. |
|
https://github.com/OpenAPITools/openapi-generator/actions/runs/16968373859/job/48211714077?pr=21749 please follow step 3 to update the samples https://github.com/OpenAPITools/openapi-generator/actions/runs/16968373866/job/48211619581?pr=21749 that's fixed in the latest master. please merge it into your branch thanks for the contribution |
690315a to
e847cbe
Compare
Thanks for the hint! Fixed. |
I merged the latest master into my branch. Added the samples that were created during the bin/generate-samples.sh run. |
|
@wing328 Do you have any idea when the pr could be merged? :-) |
|
just merged it. thanks for the contribution. have a nice weekend. |
|
Great! Thanks a lot! |
…uest are not generated (at least with Spring Boot generator) (OpenAPITools#21749) * fix(Spring Boot): adds validation to body params of forms requests * fix(Spring Boot): adds test for validation of body params of forms requests * fix(Spring Boot): adds samples
@cachescrubber @welshm @MelleD @atextor @manedev79 @javisst @borsch @Zomzog @martin-mfg
Validation constraints like minLength, maxLength, pattern defined for parameters within request bodies of
application/x-www-form-urlencoded content are not generated in the API interfaces.
The formParams.mustache is missing the beanValidationBodyParams template call (as opposed for example to the regular bodyParams.mustache).
This PR fixes it for the Spring generator.
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)"fixes #123"present in the PR description)