OpenAPITools / OpenAPITools/openapi-generator
[REQ] [Java] Container bean validation customisation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Hello
I've got some issues with beanValidation in latest versions of generator with containers.
https://github.com/OpenAPITools/openapi-generator/blob/7bc2a660658766175a0fcde8e77c1b475bc970e6/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java#L1075-L1080
Was identified all bean validation for container are hardcoded, which is fully breaking templating for containers and arrays.
Can we reuse for getBeanValidation our beanValidationCore.mustache definition ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java around lines 1075-1080 and inspect the beanValidationCore.mustache definition. Confirm how getBeanValidation currently handles container and array validation, then verify that the resulting customization is applied consistently through the relevant generator templates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100