This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push:
new ae015aa57c0 Regen
ae015aa57c0 is described below
commit ae015aa57c0e6822219cdfaf0e87a40e7dc78a8f
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Mar 30 19:01:58 2024 +0100
Regen
---
.../catalog/components/rest-openapi.json | 37 ++++++++++------------
.../src/main/docs/rest-openapi.json | 6 ----
.../RestOpenApiComponentConfiguration.java | 17 ----------
.../springboot/RestOpenApiComponentConverter.java | 2 --
4 files changed, 17 insertions(+), 45 deletions(-)
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/rest-openapi.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/rest-openapi.json
index 92191dd9495..754f9cb93fa 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/rest-openapi.json
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/rest-openapi.json
@@ -25,23 +25,22 @@
"componentProperties": {
"basePath": { "index": 0, "kind": "property", "displayName": "Base Path",
"group": "common", "label": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "API basePath, for example \/v2. Default is
unset, if set overrides the value present in OpenApi specification." },
"specificationUri": { "index": 1, "kind": "property", "displayName":
"Specification Uri", "group": "common", "label": "common", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "openapi.json",
"description": "Path to the OpenApi specification file. The scheme, host base
path are taken from this specification, but these can be overridden with
properties on the component or endpoint level. If [...]
- "requestValidationCustomizer": { "index": 2, "kind": "property",
"displayName": "Request Validation Customizer", "group": "common (advanced)",
"label": "common,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer",
"deprecated": false, "autowired": false, "secret": false, "description": "If
request validation is enabled, this option provides the capability to customize
the creation of OpenApiInterac [...]
- "apiContextPath": { "index": 3, "kind": "property", "displayName": "Api
Context Path", "group": "consumer", "label": "consumer", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Sets the context-path to
use for servicing the OpenAPI specification" },
- "bridgeErrorHandler": { "index": 4, "kind": "property", "displayName":
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Allows for bridging the consumer to the Camel routing Error Handler, which
mean any exceptions (if possible) occurred while the Camel consumer is trying
to pickup incoming messages, or the like [...]
- "missingOperation": { "index": 5, "kind": "property", "displayName":
"Missing Operation", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "enum": [ "fail",
"ignore", "mock" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "fail", "description": "Whether the consumer should fail,ignore
or return a mock response for OpenAPI operations that are not mapped to a
corresponding route." },
- "consumerComponentName": { "index": 6, "kind": "property", "displayName":
"Consumer Component Name", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "Name of the Camel component that will service the requests. The
component must be present in Camel registry and it must implement
RestOpenApiConsumerFactory service provider interfac [...]
- "mockIncludePattern": { "index": 7, "kind": "property", "displayName":
"Mock Include Pattern", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "classpath:camel-mock\/**", "description": "Used for inclusive
filtering of mock data from directories. The pattern is using Ant-path style
pattern. Multiple patterns can be specified sepa [...]
- "restOpenapiProcessorStrategy": { "index": 8, "kind": "property",
"displayName": "Rest Openapi Processor Strategy", "group": "consumer
(advanced)", "label": "consumer,advanced", "required": false, "type": "object",
"javaType":
"org.apache.camel.component.rest.openapi.RestOpenapiProcessorStrategy",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom strategy for how to process Rest DSL requests" },
- "host": { "index": 9, "kind": "property", "displayName": "Host", "group":
"producer", "label": "producer", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Scheme hostname and port to direct the HTTP
requests to in the form of https:\/\/hostname:port. Can be configured at the
endpoint, component or in the corresponding REST configuration in the Camel
Context. If you give this component a nam [...]
- "lazyStartProducer": { "index": 10, "kind": "property", "displayName":
"Lazy Start Producer", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the producer should be started lazy (on the first message). By
starting lazy you can use this to allow CamelContext and routes to startup in
situations where a producer may otherwise fai [...]
- "requestValidationEnabled": { "index": 11, "kind": "property",
"displayName": "Request Validation Enabled", "group": "producer", "label":
"producer", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "description": "Enable validation of requests against the configured
OpenAPI specification" },
- "componentName": { "index": 12, "kind": "property", "displayName":
"Component Name", "group": "producer (advanced)", "label": "producer,advanced",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "Name
of the Camel component that will perform the requests. The component must be
present in Camel registry and it must implement RestProducerFactory service
provider interface. If not set CLASSPATH [...]
- "consumes": { "index": 13, "kind": "property", "displayName": "Consumes",
"group": "producer (advanced)", "label": "producer,advanced", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "What payload type this
component capable of consuming. Could be one type, like application\/json or
multiple types as application\/json, application\/xml; q=0.5 according to the
RFC7231. This equates to the va [...]
- "produces": { "index": 14, "kind": "property", "displayName": "Produces",
"group": "producer (advanced)", "label": "producer,advanced", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "What payload type this
component is producing. For example application\/json according to the RFC7231.
This equates to the value of Content-Type HTTP header. If set overrides any
value present in the OpenApi s [...]
- "autowiredEnabled": { "index": 15, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching [...]
- "clientRequestValidation": { "index": 16, "kind": "property",
"displayName": "Client Request Validation", "group": "consumes", "label":
"consumes", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "description": "Whether to enable validation of the client request to
check if the incoming request is valid according to the OpenAPI specification"
},
- "sslContextParameters": { "index": 17, "kind": "property", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "description": "Customize TLS parameters
used by the component. If not set defaults to the TLS parameters set in the
Camel context" },
- "useGlobalSslContextParameters": { "index": 18, "kind": "property",
"displayName": "Use Global Ssl Context Parameters", "group": "security",
"label": "security", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Enable usage of global SSL context
parameters." }
+ "apiContextPath": { "index": 2, "kind": "property", "displayName": "Api
Context Path", "group": "consumer", "label": "consumer", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "Sets the context-path to
use for servicing the OpenAPI specification" },
+ "bridgeErrorHandler": { "index": 3, "kind": "property", "displayName":
"Bridge Error Handler", "group": "consumer", "label": "consumer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Allows for bridging the consumer to the Camel routing Error Handler, which
mean any exceptions (if possible) occurred while the Camel consumer is trying
to pickup incoming messages, or the like [...]
+ "missingOperation": { "index": 4, "kind": "property", "displayName":
"Missing Operation", "group": "consumer", "label": "consumer", "required":
false, "type": "string", "javaType": "java.lang.String", "enum": [ "fail",
"ignore", "mock" ], "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "fail", "description": "Whether the consumer should fail,ignore
or return a mock response for OpenAPI operations that are not mapped to a
corresponding route." },
+ "consumerComponentName": { "index": 5, "kind": "property", "displayName":
"Consumer Component Name", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"description": "Name of the Camel component that will service the requests. The
component must be present in Camel registry and it must implement
RestOpenApiConsumerFactory service provider interfac [...]
+ "mockIncludePattern": { "index": 6, "kind": "property", "displayName":
"Mock Include Pattern", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": "classpath:camel-mock\/**", "description": "Used for inclusive
filtering of mock data from directories. The pattern is using Ant-path style
pattern. Multiple patterns can be specified sepa [...]
+ "restOpenapiProcessorStrategy": { "index": 7, "kind": "property",
"displayName": "Rest Openapi Processor Strategy", "group": "consumer
(advanced)", "label": "consumer,advanced", "required": false, "type": "object",
"javaType":
"org.apache.camel.component.rest.openapi.RestOpenapiProcessorStrategy",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom strategy for how to process Rest DSL requests" },
+ "host": { "index": 8, "kind": "property", "displayName": "Host", "group":
"producer", "label": "producer", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Scheme hostname and port to direct the HTTP
requests to in the form of https:\/\/hostname:port. Can be configured at the
endpoint, component or in the corresponding REST configuration in the Camel
Context. If you give this component a nam [...]
+ "lazyStartProducer": { "index": 9, "kind": "property", "displayName":
"Lazy Start Producer", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the producer should be started lazy (on the first message). By
starting lazy you can use this to allow CamelContext and routes to startup in
situations where a producer may otherwise fail [...]
+ "requestValidationEnabled": { "index": 10, "kind": "property",
"displayName": "Request Validation Enabled", "group": "producer", "label":
"producer", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "description": "Enable validation of requests against the configured
OpenAPI specification" },
+ "componentName": { "index": 11, "kind": "property", "displayName":
"Component Name", "group": "producer (advanced)", "label": "producer,advanced",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "Name
of the Camel component that will perform the requests. The component must be
present in Camel registry and it must implement RestProducerFactory service
provider interface. If not set CLASSPATH [...]
+ "consumes": { "index": 12, "kind": "property", "displayName": "Consumes",
"group": "producer (advanced)", "label": "producer,advanced", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "What payload type this
component capable of consuming. Could be one type, like application\/json or
multiple types as application\/json, application\/xml; q=0.5 according to the
RFC7231. This equates to the va [...]
+ "produces": { "index": 13, "kind": "property", "displayName": "Produces",
"group": "producer (advanced)", "label": "producer,advanced", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "What payload type this
component is producing. For example application\/json according to the RFC7231.
This equates to the value of Content-Type HTTP header. If set overrides any
value present in the OpenApi s [...]
+ "autowiredEnabled": { "index": 14, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching [...]
+ "clientRequestValidation": { "index": 15, "kind": "property",
"displayName": "Client Request Validation", "group": "consumes", "label":
"consumes", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "description": "Whether to enable validation of the client request to
check if the incoming request is valid according to the OpenAPI specification"
},
+ "sslContextParameters": { "index": 16, "kind": "property", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "description": "Customize TLS parameters
used by the component. If not set defaults to the TLS parameters set in the
Camel context" },
+ "useGlobalSslContextParameters": { "index": 17, "kind": "property",
"displayName": "Use Global Ssl Context Parameters", "group": "security",
"label": "security", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Enable usage of global SSL context
parameters." }
},
"properties": {
"specificationUri": { "index": 0, "kind": "path", "displayName":
"Specification Uri", "group": "common", "label": "common", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "openapi.json",
"description": "Path to the OpenApi specification file. The scheme, host base
path are taken from this specification, but these can be overridden with
properties on the component or endpoint level. If not [...]
@@ -61,8 +60,6 @@
"requestValidationEnabled": { "index": 14, "kind": "parameter",
"displayName": "Request Validation Enabled", "group": "producer", "label":
"producer", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "description": "Enable validation of requests against the configured
OpenAPI specification" },
"componentName": { "index": 15, "kind": "parameter", "displayName":
"Component Name", "group": "producer (advanced)", "label": "producer,advanced",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "Name
of the Camel component that will perform the requests. The component must be
present in Camel registry and it must implement RestProducerFactory service
provider interface. If not set CLASSPAT [...]
"lazyStartProducer": { "index": 16, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
- "requestValidationCustomizer": { "index": 17, "kind": "parameter",
"displayName": "Request Validation Customizer", "group": "advanced", "label":
"advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer",
"deprecated": false, "autowired": false, "secret": false, "description": "If
request validation is enabled, this option provides the capability to customize
the creation of OpenApiInteractionValidator [...]
- "requestValidationLevels": { "index": 18, "kind": "parameter",
"displayName": "Request Validation Levels", "group": "advanced", "label":
"advanced", "required": false, "type": "object", "javaType":
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "validation.",
"multiValue": true, "deprecated": false, "autowired": false, "secret": false,
"description": "Levels for specific OpenAPI request validation options.
Multiple options can be specified as URI options prefixed by ' [...]
- "clientRequestValidation": { "index": 19, "kind": "parameter",
"displayName": "Client Request Validation", "group": "consumes", "label":
"consumes", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "description": "Whether to enable validation of the client request to
check if the incoming request is valid according to the OpenAPI specification" }
+ "clientRequestValidation": { "index": 17, "kind": "parameter",
"displayName": "Client Request Validation", "group": "consumes", "label":
"consumes", "required": false, "type": "boolean", "javaType": "boolean",
"deprecated": false, "autowired": false, "secret": false, "defaultValue":
false, "description": "Whether to enable validation of the client request to
check if the incoming request is valid according to the OpenAPI specification" }
}
}
diff --git
a/components-starter/camel-rest-openapi-starter/src/main/docs/rest-openapi.json
b/components-starter/camel-rest-openapi-starter/src/main/docs/rest-openapi.json
index bfae40e9549..cbe917253ce 100644
---
a/components-starter/camel-rest-openapi-starter/src/main/docs/rest-openapi.json
+++
b/components-starter/camel-rest-openapi-starter/src/main/docs/rest-openapi.json
@@ -108,12 +108,6 @@
"description": "What payload type this component is producing. For
example application\/json according to the RFC7231. This equates to the value
of Content-Type HTTP header. If set overrides any value present in the OpenApi
specification. Can be overridden in endpoint configuration.",
"sourceType":
"org.apache.camel.component.rest.openapi.springboot.RestOpenApiComponentConfiguration"
},
- {
- "name": "camel.component.rest-openapi.request-validation-customizer",
- "type":
"org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer",
- "description": "If request validation is enabled, this option provides
the capability to customize the creation of OpenApiInteractionValidator used to
validate requests. The option is a
org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer
type.",
- "sourceType":
"org.apache.camel.component.rest.openapi.springboot.RestOpenApiComponentConfiguration"
- },
{
"name": "camel.component.rest-openapi.request-validation-enabled",
"type": "java.lang.Boolean",
diff --git
a/components-starter/camel-rest-openapi-starter/src/main/java/org/apache/camel/component/rest/openapi/springboot/RestOpenApiComponentConfiguration.java
b/components-starter/camel-rest-openapi-starter/src/main/java/org/apache/camel/component/rest/openapi/springboot/RestOpenApiComponentConfiguration.java
index d329bfd6539..70ee499c524 100644
---
a/components-starter/camel-rest-openapi-starter/src/main/java/org/apache/camel/component/rest/openapi/springboot/RestOpenApiComponentConfiguration.java
+++
b/components-starter/camel-rest-openapi-starter/src/main/java/org/apache/camel/component/rest/openapi/springboot/RestOpenApiComponentConfiguration.java
@@ -17,7 +17,6 @@
package org.apache.camel.component.rest.openapi.springboot;
import org.apache.camel.component.rest.openapi.RestOpenapiProcessorStrategy;
-import
org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer;
import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
import org.apache.camel.support.jsse.SSLContextParameters;
import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -53,13 +52,6 @@ public class RestOpenApiComponentConfiguration
* configuration.
*/
private String specificationUri = "openapi.json";
- /**
- * If request validation is enabled, this option provides the capability to
- * customize the creation of OpenApiInteractionValidator used to validate
- * requests. The option is a
- *
org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer
type.
- */
- private RequestValidationCustomizer requestValidationCustomizer;
/**
* Sets the context-path to use for servicing the OpenAPI specification
*/
@@ -194,15 +186,6 @@ public class RestOpenApiComponentConfiguration
this.specificationUri = specificationUri;
}
- public RequestValidationCustomizer getRequestValidationCustomizer() {
- return requestValidationCustomizer;
- }
-
- public void setRequestValidationCustomizer(
- RequestValidationCustomizer requestValidationCustomizer) {
- this.requestValidationCustomizer = requestValidationCustomizer;
- }
-
public String getApiContextPath() {
return apiContextPath;
}
diff --git
a/components-starter/camel-rest-openapi-starter/src/main/java/org/apache/camel/component/rest/openapi/springboot/RestOpenApiComponentConverter.java
b/components-starter/camel-rest-openapi-starter/src/main/java/org/apache/camel/component/rest/openapi/springboot/RestOpenApiComponentConverter.java
index 29ca77e2f38..ffa32d9113f 100644
---
a/components-starter/camel-rest-openapi-starter/src/main/java/org/apache/camel/component/rest/openapi/springboot/RestOpenApiComponentConverter.java
+++
b/components-starter/camel-rest-openapi-starter/src/main/java/org/apache/camel/component/rest/openapi/springboot/RestOpenApiComponentConverter.java
@@ -39,7 +39,6 @@ public class RestOpenApiComponentConverter implements
GenericConverter {
public Set<ConvertiblePair> getConvertibleTypes() {
Set<ConvertiblePair> answer = new LinkedHashSet<>();
- answer.add(new ConvertiblePair(String.class,
org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer.class));
answer.add(new ConvertiblePair(String.class,
org.apache.camel.component.rest.openapi.RestOpenapiProcessorStrategy.class));
answer.add(new ConvertiblePair(String.class,
org.apache.camel.support.jsse.SSLContextParameters.class));
return answer;
@@ -58,7 +57,6 @@ public class RestOpenApiComponentConverter implements
GenericConverter {
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
- case
"org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer":
return applicationContext.getBean(ref,
org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer.class);
case
"org.apache.camel.component.rest.openapi.RestOpenapiProcessorStrategy": return
applicationContext.getBean(ref,
org.apache.camel.component.rest.openapi.RestOpenapiProcessorStrategy.class);
case "org.apache.camel.support.jsse.SSLContextParameters": return
applicationContext.getBean(ref,
org.apache.camel.support.jsse.SSLContextParameters.class);
}