This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-2.21.x in repository https://gitbox.apache.org/repos/asf/camel.git
commit aa8962a7d96ce9fb2147262544e385e5f11daf9e Author: Claus Ibsen <claus.ib...@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 5da5c6b..9c853c8 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) {