swagger-api / swagger-api/swagger-codegen
[JavaSpring] responseWrapper method body does not match with method signature
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
When using the responseWrapper configuration, the ResponseEntity is wrapped correctly in the method signature, but the content will still return a Future.
Also the fully qualified name for DeferredResult is an old package and doesn't resolve in Spring latest version.
Swagger-codegen version
2.2.0
Command line used for generation
responseWrapper
async
jdk8
Suggest a Fix
api.mustache and apiController.mustache method body
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
Inspect api.mustache and apiController.mustache, comparing the generated responseWrapper method signature with its method body and the DeferredResult package reference. Reproduce generation with responseWrapper, async, and jdk8, then verify the generated Spring code has matching response content and a package reference that resolves in current Spring versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100