camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-10597) Swagger prints child object types as string parameters rather than refs
Date Wed, 14 Dec 2016 15:34:58 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-10597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15748641#comment-15748641
] 

ASF GitHub Bot commented on CAMEL-10597:
----------------------------------------

Github user bobpaulin closed the pull request at:

    https://github.com/apache/camel/pull/1348


> Swagger prints child object types as string parameters rather than refs
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-10597
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10597
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-swagger
>    Affects Versions: 2.18.0
>            Reporter: Bob Paulin
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.18.2, 2.19.0
>
>
> Assume I have rest path
> {code}
> rest("/test").get().type(ClassA.class).to("direct:someRoute");
> rest("/testSub").get().type(ClassB.class).to("direct:someOtherRoute");
> {code}
> And in the type ClassA contains a reference to ClassB.
> Within the Swagger Doc the path for ClassA renders as expected:
> {code}
> /test:
>     get:
>       responses:
>         200:
>           schema:
>             $ref: '#/definitions/ClassA'
> {code}
> However ClassB gets a string parameter scheme
> {code} 
> /testSub:
>     get:
>       responses:
>         200:
>           schema:
>              type : 'string'
>              format : 'com.ClassB'
> {code}
> However I'd expect it to be:
> {code}
> /testSub:
>     get:
>       responses:
>         200:
>           schema:
>             $ref: '#/definitions/ClassB'
> {code}



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

Mime
View raw message