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-10675) Swagger is not generating schema ref for body parameter
Date Thu, 05 Jan 2017 15:11:58 GMT

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

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

GitHub user stepienj opened a pull request:

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

    CAMEL-10675 - camel swagger java models were not updated to models with vendor extension

    

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

    $ git pull https://github.com/stepienj/camel master

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

    https://github.com/apache/camel/pull/1378.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 #1378
    
----
commit 2583ee5f387083ac5f5f9146c975d9b37238a51b
Author: Jacek Stępień <jacek.stepien@fortrus.com>
Date:   2017-01-05T14:49:33Z

    Fix for invalid logic in swagger java component - models were not updated to models with
vendor extension

----


> Swagger is not generating schema ref for body parameter
> -------------------------------------------------------
>
>                 Key: CAMEL-10675
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10675
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-swagger
>    Affects Versions: 2.18.1
>            Reporter: Jacek Stępień
>
> {code}
>             // favor keeping any existing model that has the vendor extension in the
model
>             boolean oldExt = false;
>             if (swagger.getDefinitions() != null && swagger.getDefinitions().get(entry.getKey())
!= null) {
>                 Model oldModel = swagger.getDefinitions().get(entry.getKey());
>                 if (oldModel.getVendorExtensions() != null && !oldModel.getVendorExtensions().isEmpty())
{
>                     oldExt = oldModel.getVendorExtensions().get("x-className") == null;
>                 }
>             }
>             if (!oldExt) {
>                 swagger.model(entry.getKey(), entry.getValue());
>             }
> {code}
> The logic is invalid. Should not update model when oldModel.getVendorExtensions().get("x-className")
!= null



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

Mime
View raw message