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/f465ab51
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f465ab51
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f465ab51

Branch: refs/heads/camel-2.17.x
Commit: f465ab51d36b5043f32b643e52b5ea59ebcbbf48
Parents: 18eef8c
Author: Claus Ibsen <davscl...@apache.org>
Authored: Thu Apr 7 12:33:25 2016 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Thu Apr 7 12:33:49 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/f465ab51/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());
                 }
             }

Reply via email to