You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/12/14 14:55:58 UTC

[jira] [Commented] (CAMEL-10597) Swagger prints child object types as string parameters rather than refs

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

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

GitHub user bobpaulin opened a pull request:

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

    CAMEL-10597 - Allow addition of x-className to empty VendorExtensions

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bobpaulin/camel CAMEL-10597

Alternatively you can review and apply these changes as the patch at:

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

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #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
>            Priority: Minor
>
> 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)