Description
Since #4068 the return code can't be set anymore as the *Api interface return values changed from javax.ws.rs.Response to generated models.
Generally this seems like a good move, but CXF now automatically sets the HTTP codes and, for example, always sends 204 for void returns.
Besides, custom success codes can't be set anymore at all.
Swagger-codegen version
2.2.2-SNAPSHOT
Swagger declaration file content or url
swagger: '2.0'
info:
version: 1.0.0
title: Wrong/forced return code example
host: example.com
basePath: /
schemes:
- http
consumes:
- application/json
produces:
- application/json
paths:
/example:
get:
responses:
299:
description: Example
The resulting code will always end up returning 204.
Command line used for generation
java -jar swagger-codegen-cli.jar generate -i schema.json -l jaxrs-cxf
Steps to reproduce
--
Related issues
Pull #4068
Suggest a Fix
a) Go back to returning the generic javax.ws.rs.Response
b) Provide alternative way of setting the HTTP code
Description
Since #4068 the return code can't be set anymore as the *Api interface return values changed from javax.ws.rs.Response to generated models.
Generally this seems like a good move, but CXF now automatically sets the HTTP codes and, for example, always sends 204 for void returns.
Besides, custom success codes can't be set anymore at all.
Swagger-codegen version
2.2.2-SNAPSHOT
Swagger declaration file content or url
The resulting code will always end up returning 204.
Command line used for generation
java -jar swagger-codegen-cli.jar generate -i schema.json -l jaxrs-cxf
Steps to reproduce
--
Related issues
Pull #4068
Suggest a Fix
a) Go back to returning the generic javax.ws.rs.Response
b) Provide alternative way of setting the HTTP code