OpenAPITools / OpenAPITools/openapi-generator
[REQ] Disable TYPE_USE @Valid bean validation annotation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
As of openapi-generator 7.2.0 the following code gets generated with the jaxrs-spec generator:
private @Valid List<@Valid Address> addresses;
In openapi-generator 7.1.0 this was:
private @Valid List<Address> addresses;
The @Valid annotation does not permit location TYPE_USE on Java EE 7 (bean-validation 1.1).
This is only possible since Java EE 8 (bean-validation 2.0).
Describe the solution you'd like
Option to disable TYPE_USE @Valid annotation, or to configure the bean-validation version to use.
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 with the jaxrs-spec generator and compare its generated field output between openapi-generator 7.1.0 and 7.2.0. The work is done when users can disable TYPE_USE @Valid or configure the bean-validation version so Java EE 7-compatible output omits the nested annotation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100