Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
2.16.1
-
None
-
Unknown
Description
When I specify a responseModel in a rest responseMessage definition like so:
rest().put("{accountNumber}") .responseMessage() .code(HttpURLConnection.HTTP_OK) .message("Account was successfully updated.") .responseModel(AccountDetails.class) .endResponseMessage() .to("direct:foo");
I get the following Swagger API fragment:
"responses": { "200": { "description": "Account was successfully updated." } }
However, if I specify the response model as the outType instead, I get a fragment like this instead:
"responses": { "200": { "description": "Account was successfully updated.", "schema": { "$ref": "#/definitions/AccountDetails" } } }
Doing it the latter way means I can't specify different out types for different status codes. It's only added to the 200 status code as far as I can tell.