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/12/14 15:32:59 UTC
[jira] [Resolved] (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:all-tabpanel ]
Claus Ibsen resolved CAMEL-10597.
---------------------------------
Resolution: Fixed
Assignee: Claus Ibsen
Fix Version/s: 2.19.0
2.18.2
Thanks for the PR
> 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)