swagger-api / swagger-api/swagger-codegen-generators
[jaxrs-di] Bean Validation not respected for body params
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
When generating APIs using the jaxrs-di library, bean validation annotations are not added to the generated API classes for body params:
public Response createFoo(@Parameter(description = "" ) Foo body
,@Context SecurityContext securityContext)
throws NotFoundException {
return delegate.createFoo(body,securityContext);
}
This results in the delegate receiving non-validated data.
Note that this may be more systemic in the jaxrs-di project, but I haven't gotten deep enough to check validation of non-body parameters yet.
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 by tracing the jaxrs-di generation path for the generated API class and its body-parameter handling, then compare the shown output with generated APIs for other parameter types. Done means body parameters carry the expected Bean Validation annotations and invalid body data is rejected before reaching the delegate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100