You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2018/12/21 15:30:03 UTC
[camel] 02/05: CAMEL-13029: camel-swagger-java - Should default use
scheme from rest-dsl configuration in swagger doc
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4c158a4df8c73435bdc269bcb4a772c80c3cf661
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Dec 21 16:16:28 2018 +0100
CAMEL-13029: camel-swagger-java - Should default use scheme from rest-dsl configuration in swagger doc
---
.../org/apache/camel/swagger/SwaggerRestApiProcessorFactory.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/SwaggerRestApiProcessorFactory.java b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/SwaggerRestApiProcessorFactory.java
index 7d89b9a..dfdaf84 100644
--- a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/SwaggerRestApiProcessorFactory.java
+++ b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/SwaggerRestApiProcessorFactory.java
@@ -56,6 +56,14 @@ public class SwaggerRestApiProcessorFactory implements RestApiProcessorFactory {
}
}
}
+ // and include the default scheme as well if not explicit configured
+ if (!options.containsKey("schemes") && !options.containsKey("schemas")) {
+ // NOTE schemas is a typo but kept for backwards compatible
+ String scheme = configuration.getScheme();
+ if (scheme != null) {
+ options.put("schemes", scheme);
+ }
+ }
// and context path is the base.path
String path = configuration.getContextPath();
if (path != null) {