camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: CAMEL-9828: Swagger seems to inject empty headers for query parameters
Date Thu, 07 Apr 2016 10:34:04 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.17.x 18eef8c05 -> f465ab51d
  refs/heads/master 0832d3c97 -> 592e1cd26


CAMEL-9828: Swagger seems to inject empty headers for query parameters


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

Branch: refs/heads/master
Commit: 592e1cd26c268975a4213a408dac34290ec97866
Parents: 0832d3c
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Apr 7 12:33:25 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Apr 7 12:33:25 2016 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/model/rest/RestDefinition.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/592e1cd2/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java
index 5084b38..840e567 100644
--- a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java
@@ -707,7 +707,7 @@ public class RestDefinition extends OptionalIdentifiedDefinition<RestDefinition>
             }
             // register all the default values for the query parameters
             for (RestOperationParamDefinition param : verb.getParams()) {
-                if (RestParamType.query == param.getType() && param.getDefaultValue()
!= null) {
+                if (RestParamType.query == param.getType() && ObjectHelper.isNotEmpty(param.getDefaultValue()))
{
                     binding.addDefaultValue(param.getName(), param.getDefaultValue());
                 }
             }


Mime
View raw message