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

davsclaus pushed a commit to branch openapi2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e7991e7f33d4d9b274cf5238e965c8786db885a8
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Mon Mar 25 15:59:42 2024 +0100

    CAMEL-20557: Rest DSL to use openapi spec directly
---
 .../dsl/RestOpenapiComponentBuilderFactory.java    | 116 +++++++++++----------
 1 file changed, 59 insertions(+), 57 deletions(-)

diff --git 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RestOpenapiComponentBuilderFactory.java
 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RestOpenapiComponentBuilderFactory.java
index a44a3419edd..c55ac1ad560 100644
--- 
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RestOpenapiComponentBuilderFactory.java
+++ 
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RestOpenapiComponentBuilderFactory.java
@@ -50,6 +50,21 @@ public interface RestOpenapiComponentBuilderFactory {
     interface RestOpenapiComponentBuilder
             extends
                 ComponentBuilder<RestOpenApiComponent> {
+        /**
+         * API basePath, for example /v2. Default is unset, if set overrides 
the
+         * value present in OpenApi specification.
+         * 
+         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
+         * 
+         * Group: common
+         * 
+         * @param basePath the value to set
+         * @return the dsl builder
+         */
+        default RestOpenapiComponentBuilder basePath(java.lang.String 
basePath) {
+            doSetProperty("basePath", basePath);
+            return this;
+        }
         /**
          * Enable validation of requests against the configured OpenAPI
          * specification.
@@ -67,6 +82,47 @@ public interface RestOpenapiComponentBuilderFactory {
             doSetProperty("requestValidationEnabled", 
requestValidationEnabled);
             return this;
         }
+        /**
+         * 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 given the
+         * component tries to load openapi.json resource. Note that the host
+         * defined on the component and endpoint of this Component should
+         * contain the scheme, hostname and optionally the port in the URI
+         * syntax (i.e. https://api.example.com:8080). Can be overridden in
+         * endpoint configuration.
+         * 
+         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
+         * 
+         * Default: openapi.json
+         * Group: common
+         * 
+         * @param specificationUri the value to set
+         * @return the dsl builder
+         */
+        default RestOpenapiComponentBuilder specificationUri(
+                java.lang.String specificationUri) {
+            doSetProperty("specificationUri", specificationUri);
+            return this;
+        }
+        /**
+         * If request validation is enabled, this option provides the 
capability
+         * to customize the creation of OpenApiInteractionValidator used to
+         * validate requests.
+         * 
+         * The option is a:
+         * 
&lt;code&gt;org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer&lt;/code&gt;
 type.
+         * 
+         * Group: common (advanced)
+         * 
+         * @param requestValidationCustomizer the value to set
+         * @return the dsl builder
+         */
+        default RestOpenapiComponentBuilder requestValidationCustomizer(
+                
org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer 
requestValidationCustomizer) {
+            doSetProperty("requestValidationCustomizer", 
requestValidationCustomizer);
+            return this;
+        }
         /**
          * Allows for bridging the consumer to the Camel routing Error Handler,
          * which mean any exceptions (if possible) occurred while the Camel
@@ -147,21 +203,6 @@ public interface RestOpenapiComponentBuilderFactory {
             doSetProperty("restOpenapiProcessorStrategy", 
restOpenapiProcessorStrategy);
             return this;
         }
-        /**
-         * API basePath, for example /v2. Default is unset, if set overrides 
the
-         * value present in OpenApi specification.
-         * 
-         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
-         * 
-         * Group: producer
-         * 
-         * @param basePath the value to set
-         * @return the dsl builder
-         */
-        default RestOpenapiComponentBuilder basePath(java.lang.String 
basePath) {
-            doSetProperty("basePath", basePath);
-            return this;
-        }
         /**
          * Scheme hostname and port to direct the HTTP requests to in the form
          * of https://hostname:port. Can be configured at the endpoint,
@@ -207,27 +248,6 @@ public interface RestOpenapiComponentBuilderFactory {
             doSetProperty("lazyStartProducer", lazyStartProducer);
             return this;
         }
-        /**
-         * 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 given the
-         * component tries to load openapi.json resource. Note that the host
-         * defined on the component and endpoint of this Component should
-         * contain the scheme, hostname and optionally the port in the URI
-         * syntax (i.e. https://api.example.com:8080). Can be overridden in
-         * endpoint configuration.
-         * 
-         * Default: openapi.json
-         * Group: producer
-         * 
-         * @param specificationUri the value to set
-         * @return the dsl builder
-         */
-        default RestOpenapiComponentBuilder specificationUri(
-                String specificationUri) {
-            doSetProperty("specificationUri", specificationUri);
-            return this;
-        }
         /**
          * Name of the Camel component that will perform the requests. The
          * component must be present in Camel registry and it must implement
@@ -304,24 +324,6 @@ public interface RestOpenapiComponentBuilderFactory {
             doSetProperty("autowiredEnabled", autowiredEnabled);
             return this;
         }
-        /**
-         * If request validation is enabled, this option provides the 
capability
-         * to customize the creation of OpenApiInteractionValidator used to
-         * validate requests.
-         * 
-         * The option is a:
-         * 
&lt;code&gt;org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer&lt;/code&gt;
 type.
-         * 
-         * Group: advanced
-         * 
-         * @param requestValidationCustomizer the value to set
-         * @return the dsl builder
-         */
-        default RestOpenapiComponentBuilder requestValidationCustomizer(
-                
org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer 
requestValidationCustomizer) {
-            doSetProperty("requestValidationCustomizer", 
requestValidationCustomizer);
-            return this;
-        }
         /**
          * Customize TLS parameters used by the component. If not set defaults
          * to the TLS parameters set in the Camel context.
@@ -372,20 +374,20 @@ public interface RestOpenapiComponentBuilderFactory {
                 String name,
                 Object value) {
             switch (name) {
+            case "basePath": ((RestOpenApiComponent) 
component).setBasePath((java.lang.String) value); return true;
             case "requestValidationEnabled": ((RestOpenApiComponent) 
component).setRequestValidationEnabled((boolean) value); return true;
+            case "specificationUri": ((RestOpenApiComponent) 
component).setSpecificationUri((java.lang.String) value); return true;
+            case "requestValidationCustomizer": ((RestOpenApiComponent) 
component).setRequestValidationCustomizer((org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer)
 value); return true;
             case "bridgeErrorHandler": ((RestOpenApiComponent) 
component).setBridgeErrorHandler((boolean) value); return true;
             case "missingOperation": ((RestOpenApiComponent) 
component).setMissingOperation((java.lang.String) value); return true;
             case "consumerComponentName": ((RestOpenApiComponent) 
component).setConsumerComponentName((java.lang.String) value); return true;
             case "restOpenapiProcessorStrategy": ((RestOpenApiComponent) 
component).setRestOpenapiProcessorStrategy((org.apache.camel.component.rest.openapi.RestOpenapiProcessorStrategy)
 value); return true;
-            case "basePath": ((RestOpenApiComponent) 
component).setBasePath((java.lang.String) value); return true;
             case "host": ((RestOpenApiComponent) 
component).setHost((java.lang.String) value); return true;
             case "lazyStartProducer": ((RestOpenApiComponent) 
component).setLazyStartProducer((boolean) value); return true;
-            case "specificationUri": ((RestOpenApiComponent) 
component).setSpecificationUri((java.lang.String) value); return true;
             case "componentName": ((RestOpenApiComponent) 
component).setComponentName((java.lang.String) value); return true;
             case "consumes": ((RestOpenApiComponent) 
component).setConsumes((java.lang.String) value); return true;
             case "produces": ((RestOpenApiComponent) 
component).setProduces((java.lang.String) value); return true;
             case "autowiredEnabled": ((RestOpenApiComponent) 
component).setAutowiredEnabled((boolean) value); return true;
-            case "requestValidationCustomizer": ((RestOpenApiComponent) 
component).setRequestValidationCustomizer((org.apache.camel.component.rest.openapi.validator.RequestValidationCustomizer)
 value); return true;
             case "sslContextParameters": ((RestOpenApiComponent) 
component).setSslContextParameters((org.apache.camel.support.jsse.SSLContextParameters)
 value); return true;
             case "useGlobalSslContextParameters": ((RestOpenApiComponent) 
component).setUseGlobalSslContextParameters((boolean) value); return true;
             default: return false;

Reply via email to