camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [7/7] camel git commit: CAMEL-9732: camel-swagger-java - Issue in appendModels in the reader
Date Mon, 21 Mar 2016 16:01:28 GMT
CAMEL-9732: camel-swagger-java - Issue in appendModels in the reader


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7578430a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7578430a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7578430a

Branch: refs/heads/camel-2.16.x
Commit: 7578430a5c847a6a010f90cdf3194827ac149f6d
Parents: ca1c36a
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Mar 21 17:00:20 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Mar 21 17:01:10 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/camel/swagger/RestSwaggerReader.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7578430a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
----------------------------------------------------------------------
diff --git a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
index 4d9b256..37cc1e1 100644
--- a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
+++ b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
@@ -397,7 +397,10 @@ public class RestSwaggerReader {
             // 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) {
-                oldExt = swagger.getDefinitions().get(entry.getKey()).getVendorExtensions().get("x-className")
== null;
+                Model oldModel = swagger.getDefinitions().get(entry.getKey());
+                if (oldModel.getVendorExtensions() != null) {
+                    oldExt = oldModel.getVendorExtensions().get("x-className") == null;
+                }
             }
 
             if (!oldExt) {


Mime
View raw message