swagger-api / swagger-api/swagger-codegen
[JaxRS*] javax.ws.rs.core.Response vs. returnTypes
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Currently only the language jaxrs-cxf returns the "real" returnType in the method signatures as opposed to the generic javax.ws.rs.core.Response. All other Jaxrs-languages use javax.ws.rs.core.Response.
IMHO all JaxRS-languages should allow a CLI-flag ("useGenericJaxRsResponse", default value=true for backwards compatibility) whether to use the generic javax.ws.rs.core.Response or the real returnTypes in the method signatures.
Languages to be updated:
- jaxrs-cxf-cdi
- jaxrs-spec
- jaxrs (Jersey)
- jaxrs-cxf
CXF already has the check, but no CLI flag to use the Jaxrs-Response
I added the check for the CLI-flag useGenericResponse
- jaxrs-cxf-client
I added the check for the CLI-flag useGenericResponse
- jaxrs-resteasy
- java
- spring
Swagger-codegen version
2.2.2
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
Review the JAX-RS language generators listed in the issue, starting with the existing jaxrs-cxf and jaxrs-cxf-client checks for their response flags. Compare jaxrs-cxf-cdi, jaxrs-spec, jaxrs, jaxrs-resteasy, java, and spring, then verify that each supports the requested generic-response option while preserving the documented default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100