You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2020/09/08 10:46:01 UTC

[camel-spring-boot] branch master updated: CAMEL-15512: Remove the default value for apiComponent on RestConfigurationDefinition

This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/master by this push:
     new 4d9724a  CAMEL-15512: Remove the default value for apiComponent on RestConfigurationDefinition
4d9724a is described below

commit 4d9724acf5b7b1d97cf0ac9c6a08b32269d8fa41
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Tue Sep 8 11:15:27 2020 +0200

    CAMEL-15512: Remove the default value for apiComponent on RestConfigurationDefinition
---
 .../camel-core-starter/src/main/docs/core-starter.adoc             | 2 +-
 .../rest/springboot/RestConfigurationDefinitionProperties.java     | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/components-starter/camel-core-starter/src/main/docs/core-starter.adoc b/components-starter/camel-core-starter/src/main/docs/core-starter.adoc
index f94c317..69dc358 100644
--- a/components-starter/camel-core-starter/src/main/docs/core-starter.adoc
+++ b/components-starter/camel-core-starter/src/main/docs/core-starter.adoc
@@ -141,7 +141,7 @@ The component supports 145 options, which are listed below.
 | *camel.resilience4j.slow-call-rate-threshold* | Configures a threshold in percentage. The CircuitBreaker considers a call as slow when the call duration is greater than slowCallDurationThreshold(Duration. When the percentage of slow calls is equal or greater the threshold, the CircuitBreaker transitions to open and starts short-circuiting calls. The threshold must be greater than 0 and not greater than 100. Default value is 100 percentage which means that all recorded calls must be slo [...]
 | *camel.resilience4j.wait-duration-in-open-state* | Configures the wait duration (in seconds) which specifies how long the CircuitBreaker should stay open, before it switches to half open. Default value is 60 seconds. | 60 | Integer
 | *camel.resilience4j.writable-stack-trace-enabled* | Enables writable stack traces. When set to false, Exception.getStackTrace returns a zero length array. This may be used to reduce log spam when the circuit breaker is open as the cause of the exceptions is already known (the circuit breaker is short-circuiting calls). | true | Boolean
-| *camel.rest.api-component* | The name of the Camel component to use as the REST API (such as swagger) | swagger | String
+| *camel.rest.api-component* | The name of the Camel component to use as the REST API (such as swagger) If no API Component has been explicit configured, then Camel will lookup if there is a Camel component responsible for servicing and generating the REST API documentation, or if a org.apache.camel.spi.RestApiProcessorFactory is registered in the registry. If either one is found, then that is being used. |  | String
 | *camel.rest.api-context-id-pattern* | Sets an CamelContext id pattern to only allow Rest APIs from rest services within CamelContext's which name matches the pattern. The pattern #name# refers to the CamelContext name, to match on the current CamelContext only. For any other value, the pattern uses the rules from PatternHelper#matchPattern(String,String) |  | String
 | *camel.rest.api-context-listing* | Sets whether listing of all available CamelContext's with REST services in the JVM is enabled. If enabled it allows to discover these contexts, if false then only the current CamelContext is in use. | false | Boolean
 | *camel.rest.api-context-path* | Sets a leading API context-path the REST API services will be using. This can be used when using components such as camel-servlet where the deployed web application is deployed using a context-path. |  | String
diff --git a/components-starter/camel-core-starter/src/main/java/org/apache/camel/model/rest/springboot/RestConfigurationDefinitionProperties.java b/components-starter/camel-core-starter/src/main/java/org/apache/camel/model/rest/springboot/RestConfigurationDefinitionProperties.java
index 293bbc5..9cfc4e8 100644
--- a/components-starter/camel-core-starter/src/main/java/org/apache/camel/model/rest/springboot/RestConfigurationDefinitionProperties.java
+++ b/components-starter/camel-core-starter/src/main/java/org/apache/camel/model/rest/springboot/RestConfigurationDefinitionProperties.java
@@ -43,8 +43,13 @@ public class RestConfigurationDefinitionProperties {
     private String component;
     /**
      * The name of the Camel component to use as the REST API (such as swagger)
+     * If no API Component has been explicit configured, then Camel will lookup
+     * if there is a Camel component responsible for servicing and generating
+     * the REST API documentation, or if a
+     * org.apache.camel.spi.RestApiProcessorFactory is registered in the
+     * registry. If either one is found, then that is being used.
      */
-    private String apiComponent = "swagger";
+    private String apiComponent;
     /**
      * Sets the name of the Camel component to use as the REST producer
      */