You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/01/26 09:53:39 UTC

[jira] [Resolved] (CAMEL-9533) Specifying a responseModel in RestOperationResponseMsgDefinition not output in Swagger API

     [ https://issues.apache.org/jira/browse/CAMEL-9533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-9533.
--------------------------------
       Resolution: Duplicate
         Assignee: Claus Ibsen
    Fix Version/s: 2.16.2

Should be fixed by CAMEL-9447. Try the 2.16.2 release when its out

> 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
>            Assignee: Claus Ibsen
>             Fix For: 2.16.2
>
>
> 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. It's only added to the 200 status code as far as I can tell.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)