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

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

commit 8a31974e9dfce88eaa6b829636d6515f42127a62
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Apr 3 16:01:12 2024 +0200

    CAMEL-20557: Rest DSL to use openapi spec directly
---
 .../dsl/RestOpenApiEndpointBuilderFactory.java     | 144 ++++++---------------
 .../camel/kotlin/components/RestOpenapiUriDsl.kt   |  52 ++++----
 2 files changed, 63 insertions(+), 133 deletions(-)

diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestOpenApiEndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestOpenApiEndpointBuilderFactory.java
index 423af987aeb..335c442808e 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestOpenApiEndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestOpenApiEndpointBuilderFactory.java
@@ -58,23 +58,6 @@ public interface RestOpenApiEndpointBuilderFactory {
             doSetProperty("apiContextPath", apiContextPath);
             return this;
         }
-        /**
-         * Whether the consumer should fail,ignore or return a mock response 
for
-         * OpenAPI operations that are not mapped to a corresponding route.
-         * 
-         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
-         * 
-         * Default: fail
-         * Group: consumer
-         * 
-         * @param missingOperation the value to set
-         * @return the dsl builder
-         */
-        default RestOpenApiEndpointConsumerBuilder missingOperation(
-                String missingOperation) {
-            doSetProperty("missingOperation", missingOperation);
-            return this;
-        }
         /**
          * Whether to enable validation of the client request to check if the
          * incoming request is valid according to the OpenAPI specification.
@@ -82,7 +65,7 @@ public interface RestOpenApiEndpointBuilderFactory {
          * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
          * 
          * Default: false
-         * Group: consumes
+         * Group: consumer
          * 
          * @param clientRequestValidation the value to set
          * @return the dsl builder
@@ -100,7 +83,7 @@ public interface RestOpenApiEndpointBuilderFactory {
          * type.
          * 
          * Default: false
-         * Group: consumes
+         * Group: consumer
          * 
          * @param clientRequestValidation the value to set
          * @return the dsl builder
@@ -110,6 +93,41 @@ public interface RestOpenApiEndpointBuilderFactory {
             doSetProperty("clientRequestValidation", clientRequestValidation);
             return this;
         }
+        /**
+         * 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
+         * value of Accept HTTP header. If set overrides any value found in the
+         * OpenApi specification and. in the component configuration.
+         * 
+         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
+         * 
+         * Group: consumer
+         * 
+         * @param consumes the value to set
+         * @return the dsl builder
+         */
+        default RestOpenApiEndpointConsumerBuilder consumes(String consumes) {
+            doSetProperty("consumes", consumes);
+            return this;
+        }
+        /**
+         * Whether the consumer should fail,ignore or return a mock response 
for
+         * OpenAPI operations that are not mapped to a corresponding route.
+         * 
+         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
+         * 
+         * Default: fail
+         * Group: consumer
+         * 
+         * @param missingOperation the value to set
+         * @return the dsl builder
+         */
+        default RestOpenApiEndpointConsumerBuilder missingOperation(
+                String missingOperation) {
+            doSetProperty("missingOperation", missingOperation);
+            return this;
+        }
     }
 
     /**
@@ -342,24 +360,6 @@ public interface RestOpenApiEndpointBuilderFactory {
             doSetProperty("basePath", basePath);
             return this;
         }
-        /**
-         * 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
-         * value of Accept HTTP header. If set overrides any value found in the
-         * OpenApi specification and. in the component configuration.
-         * 
-         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
-         * 
-         * Group: producer
-         * 
-         * @param consumes the value to set
-         * @return the dsl builder
-         */
-        default RestOpenApiEndpointProducerBuilder consumes(String consumes) {
-            doSetProperty("consumes", consumes);
-            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,
@@ -432,41 +432,6 @@ public interface RestOpenApiEndpointBuilderFactory {
             doSetProperty("requestValidationEnabled", 
requestValidationEnabled);
             return this;
         }
-        /**
-         * Whether to enable validation of the client request to check if the
-         * incoming request is valid according to the OpenAPI specification.
-         * 
-         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
-         * 
-         * Default: false
-         * Group: consumes
-         * 
-         * @param clientRequestValidation the value to set
-         * @return the dsl builder
-         */
-        default RestOpenApiEndpointProducerBuilder clientRequestValidation(
-                boolean clientRequestValidation) {
-            doSetProperty("clientRequestValidation", clientRequestValidation);
-            return this;
-        }
-        /**
-         * Whether to enable validation of the client request to check if the
-         * incoming request is valid according to the OpenAPI specification.
-         * 
-         * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
-         * type.
-         * 
-         * Default: false
-         * Group: consumes
-         * 
-         * @param clientRequestValidation the value to set
-         * @return the dsl builder
-         */
-        default RestOpenApiEndpointProducerBuilder clientRequestValidation(
-                String clientRequestValidation) {
-            doSetProperty("clientRequestValidation", clientRequestValidation);
-            return this;
-        }
     }
 
     /**
@@ -558,41 +523,6 @@ public interface RestOpenApiEndpointBuilderFactory {
         default AdvancedRestOpenApiEndpointBuilder advanced() {
             return (AdvancedRestOpenApiEndpointBuilder) this;
         }
-        /**
-         * Whether to enable validation of the client request to check if the
-         * incoming request is valid according to the OpenAPI specification.
-         * 
-         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
-         * 
-         * Default: false
-         * Group: consumes
-         * 
-         * @param clientRequestValidation the value to set
-         * @return the dsl builder
-         */
-        default RestOpenApiEndpointBuilder clientRequestValidation(
-                boolean clientRequestValidation) {
-            doSetProperty("clientRequestValidation", clientRequestValidation);
-            return this;
-        }
-        /**
-         * Whether to enable validation of the client request to check if the
-         * incoming request is valid according to the OpenAPI specification.
-         * 
-         * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
-         * type.
-         * 
-         * Default: false
-         * Group: consumes
-         * 
-         * @param clientRequestValidation the value to set
-         * @return the dsl builder
-         */
-        default RestOpenApiEndpointBuilder clientRequestValidation(
-                String clientRequestValidation) {
-            doSetProperty("clientRequestValidation", clientRequestValidation);
-            return this;
-        }
     }
 
     /**
diff --git 
a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestOpenapiUriDsl.kt
 
b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestOpenapiUriDsl.kt
index d45cf93b1c6..8aa50678a4a 100644
--- 
a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestOpenapiUriDsl.kt
+++ 
b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestOpenapiUriDsl.kt
@@ -76,6 +76,32 @@ public class RestOpenapiUriDsl(
     it.property("apiContextPath", apiContextPath)
   }
 
+  /**
+   * Whether to enable validation of the client request to check if the 
incoming request is valid
+   * according to the OpenAPI specification
+   */
+  public fun clientRequestValidation(clientRequestValidation: String) {
+    it.property("clientRequestValidation", clientRequestValidation)
+  }
+
+  /**
+   * Whether to enable validation of the client request to check if the 
incoming request is valid
+   * according to the OpenAPI specification
+   */
+  public fun clientRequestValidation(clientRequestValidation: Boolean) {
+    it.property("clientRequestValidation", clientRequestValidation.toString())
+  }
+
+  /**
+   * 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 value of Accept HTTP header. If set overrides any value 
found in the OpenApi
+   * specification and. in the component configuration
+   */
+  public fun consumes(consumes: String) {
+    it.property("consumes", consumes)
+  }
+
   /**
    * Whether the consumer should fail,ignore or return a mock response for 
OpenAPI operations that
    * are not mapped to a corresponding route.
@@ -163,16 +189,6 @@ public class RestOpenapiUriDsl(
     it.property("basePath", basePath)
   }
 
-  /**
-   * 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 value of Accept HTTP header. If set overrides any value 
found in the OpenApi
-   * specification and. in the component configuration
-   */
-  public fun consumes(consumes: String) {
-    it.property("consumes", consumes)
-  }
-
   /**
    * 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
@@ -240,20 +256,4 @@ public class RestOpenapiUriDsl(
   public fun lazyStartProducer(lazyStartProducer: Boolean) {
     it.property("lazyStartProducer", lazyStartProducer.toString())
   }
-
-  /**
-   * Whether to enable validation of the client request to check if the 
incoming request is valid
-   * according to the OpenAPI specification
-   */
-  public fun clientRequestValidation(clientRequestValidation: String) {
-    it.property("clientRequestValidation", clientRequestValidation)
-  }
-
-  /**
-   * Whether to enable validation of the client request to check if the 
incoming request is valid
-   * according to the OpenAPI specification
-   */
-  public fun clientRequestValidation(clientRequestValidation: Boolean) {
-    it.property("clientRequestValidation", clientRequestValidation.toString())
-  }
 }

Reply via email to