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 2017/01/05 15:11:58 UTC
[jira] [Commented] (CAMEL-10675) Swagger is not generating schema
ref for body parameter
[ 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ń <ja...@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)