swagger-codegen-generators icon indicating copy to clipboard operation
swagger-codegen-generators copied to clipboard

JavaJAXRSSpecServerCodegen ignores returnResponse options

Open RaphC opened this issue 5 years ago • 2 comments

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

RaphC avatar Oct 13 '20 12:10 RaphC

I stumbled across this too. In my scenario though, I wanted any method which would return void to return a Response instead. I've created a PR which will actually allow for returnResponse to be set, and a second property to returnResponseOverVoid as well. https://github.com/swagger-api/swagger-codegen-generators/pull/1047

mcassidygamma avatar May 26 '22 12:05 mcassidygamma

Did you figure out a workaround? The maven plugin is not taking returnResponse in configOptions.

Edit: My bad.. I'm using a version 3 which doesn't support that parameter.

HEPBO3AH avatar May 18 '24 13:05 HEPBO3AH