You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Matt Sicker (JIRA)" <ji...@apache.org> on 2016/01/25 20:08:39 UTC
[jira] [Created] (CAMEL-9533) Specifying a responseModel in
RestOperationResponseMsgDefinition not output in Swagger API
Matt Sicker created CAMEL-9533:
----------------------------------
Summary: Specifying a responseModel in RestOperationResponseMsgDefinition not output in Swagger API
Key: CAMEL-9533
URL: https://issues.apache.org/jira/browse/CAMEL-9533
Project: Camel
Issue Type: Bug
Components: camel-swagger
Affects Versions: 2.16.1
Reporter: Matt Sicker
When I specify a responseModel in a rest responseMessage definition like so:
{code}
rest().put("{accountNumber}")
.responseMessage()
.code(HttpURLConnection.HTTP_OK)
.message("Account was successfully updated.")
.responseModel(AccountDetails.class)
.endResponseMessage()
.to("direct:foo");
{code}
I get the following Swagger API fragment:
{code}
"responses": {
"200": {
"description": "Account was successfully updated."
}
}
{code}
However, if I specify the response model as the outType instead, I get a fragment like this instead:
{code}
"responses": {
"200": {
"description": "Account was successfully updated.",
"schema": {
"$ref": "#/definitions/AccountDetails"
}
}
}
{code}
Doing it the latter way means I can't specify different out types for different status codes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)