Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E0F8B200BDC for ; Wed, 14 Dec 2016 16:34:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DFA30160B2E; Wed, 14 Dec 2016 15:34:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 41587160B19 for ; Wed, 14 Dec 2016 16:34:59 +0100 (CET) Received: (qmail 2868 invoked by uid 500); 14 Dec 2016 15:34:58 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 2854 invoked by uid 99); 14 Dec 2016 15:34:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Dec 2016 15:34:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5BD872C03E0 for ; Wed, 14 Dec 2016 15:34:58 +0000 (UTC) Date: Wed, 14 Dec 2016 15:34:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-10597) Swagger prints child object types as string parameters rather than refs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 14 Dec 2016 15:35:00 -0000 [ 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)