swagger-api / swagger-api/swagger-codegen-generators

JavaJAXRSSpecServerCodegen ignores returnResponse options

Open
#775 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
299
Forks
439
PR merge metrics
No merged PRs in 30d

Description

Hi,

the generator JavaJAXRSSpecServerCodegen uses a template apiInterface.mustache which allow to use Jaxrs Response as a return type instead of the generated ones by setting the returnResponse parameter when combined with option interfaceOnly :

{{#returnResponse}}Response{{/returnResponse}}{{^returnResponse}}{{>returnTypeInterface}}{{/returnResponse}}

but it seems this options is never mark as a config options. Is it possible to supporte returnReponse as a config options ?

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/main/resources/handlebars/JavaJaxRS/spec/apiInterface.mustache and then inspect JavaJAXRSSpecServerCodegen to find how generator configuration options are registered. Verify that returnResponse is accepted alongside interfaceOnly and that generated interfaces use Response when the option is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.