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 9f64e573b6eeb442c0662079288ff8ac5f67c26e
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Mon Mar 25 13:48:54 2024 +0100

    CAMEL-20557: Rest DSL to use openapi spec directly
---
 .../camel/catalog/components/rest-openapi.json     |  4 +--
 .../vertx/PlatformHttpRestOpenApiConsumerTest.java | 38 ++++++++++++++++++++++
 .../camel/component/rest/openapi/rest-openapi.json |  4 +--
 .../DefaultRestOpenapiProcessorStrategy.java       | 19 +++++++++--
 .../rest/openapi/RestOpenApiComponent.java         |  4 +--
 .../rest/openapi/RestOpenApiEndpoint.java          |  4 +--
 .../dsl/RestOpenapiComponentBuilderFactory.java    | 18 ++++++++++
 .../dsl/RestOpenApiEndpointBuilderFactory.java     |  4 +--
 .../camel/kotlin/components/RestOpenapiUriDsl.kt   |  2 +-
 9 files changed, 83 insertions(+), 14 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json
index fae90af3743..d6b3784e2d9 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json
@@ -25,7 +25,7 @@
   "componentProperties": {
     "requestValidationEnabled": { "index": 0, "kind": "property", 
"displayName": "Request Validation Enabled", "group": "common", "label": "", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": false, 
"description": "Enable validation of requests against the configured OpenAPI 
specification" },
     "bridgeErrorHandler": { "index": 1, "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": 2, "kind": "property", "displayName": 
"Missing Operation", "group": "consumer", "label": "consumer", "required": 
false, "type": "string", "javaType": "java.lang.String", "enum": [ "fail", 
"ignore", "dummy" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "fail", "description": "Whether the consumer should fail,ignore 
or return a dummy response for OpenAPI operations that are not mapped to a 
corresponding route." },
+    "missingOperation": { "index": 2, "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": 3, "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 [...]
     "restOpenapiProcessorStrategy": { "index": 4, "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" },
     "basePath": { "index": 5, "kind": "property", "displayName": "Base Path", 
"group": "producer", "label": "producer", "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." },
@@ -44,7 +44,7 @@
     "specificationUri": { "index": 0, "kind": "path", "displayName": 
"Specification Uri", "group": "common", "label": "common", "required": false, 
"type": "string", "javaType": "java.net.URI", "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 give [...]
     "operationId": { "index": 1, "kind": "path", "displayName": "Operation 
Id", "group": "producer", "label": "producer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "description": "ID of the operation from the OpenApi 
specification. This is required when using producer" },
     "requestValidationEnabled": { "index": 2, "kind": "parameter", 
"displayName": "Request Validation Enabled", "group": "common", "label": "", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": false, 
"description": "Enable validation of requests against the configured OpenAPI 
specification" },
-    "missingOperation": { "index": 3, "kind": "parameter", "displayName": 
"Missing Operation", "group": "consumer", "label": "consumer", "required": 
false, "type": "string", "javaType": "java.lang.String", "enum": [ "fail", 
"ignore", "dummy" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "fail", "description": "Whether the consumer should fail,ignore 
or return a dummy response for OpenAPI operations that are not mapped to a 
corresponding route." },
+    "missingOperation": { "index": 3, "kind": "parameter", "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." },
     "bridgeErrorHandler": { "index": 4, "kind": "parameter", "displayName": 
"Bridge Error Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "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  [...]
     "consumerComponentName": { "index": 5, "kind": "parameter", "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 interfa [...]
     "exceptionHandler": { "index": 6, "kind": "parameter", "displayName": 
"Exception Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", 
"deprecated": false, "autowired": false, "secret": false, "description": "To 
let the consumer use a custom ExceptionHandler. Notice if the option 
bridgeErrorHandler is enabled then this option is not in use. By def [...]
diff --git 
a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/PlatformHttpRestOpenApiConsumerTest.java
 
b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/PlatformHttpRestOpenApiConsumerTest.java
index c41839ef21f..57acb01609d 100644
--- 
a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/PlatformHttpRestOpenApiConsumerTest.java
+++ 
b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/PlatformHttpRestOpenApiConsumerTest.java
@@ -51,6 +51,7 @@ public class PlatformHttpRestOpenApiConsumerTest {
                     .then()
                     .statusCode(200)
                     .body(equalTo("{\"pet\": \"tony the tiger\"}"));
+
         } finally {
             context.stop();
         }
@@ -87,6 +88,43 @@ public class PlatformHttpRestOpenApiConsumerTest {
         }
     }
 
+    @Test
+    public void testRestOpenApiMock() throws Exception {
+        final CamelContext context = 
VertxPlatformHttpEngineTest.createCamelContext();
+
+        try {
+            context.addRoutes(new RouteBuilder() {
+                @Override
+                public void configure() {
+                    
from("rest-openapi:classpath:openapi-v3.json?missingOperation=mock")
+                            .log("dummy");
+
+                    from("direct:getPetById")
+                            .setBody().constant("{\"pet\": \"tony the 
tiger\"}");
+                }
+            });
+
+            context.start();
+
+            given()
+                    .when()
+                    .get("/api/v3/pet/123")
+                    .then()
+                    .statusCode(200)
+                    .body(equalTo("{\"pet\": \"tony the tiger\"}"));
+
+            // mocked gives empty response
+            given()
+                    .when()
+                    .get("/api/v3/pet/findByTags")
+                    .then()
+                    .statusCode(204)
+                    .body(equalTo(""));
+        } finally {
+            context.stop();
+        }
+    }
+
     @Test
     public void testRestOpenApiMissingOperation() throws Exception {
         final CamelContext context = 
VertxPlatformHttpEngineTest.createCamelContext();
diff --git 
a/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json
 
b/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json
index fae90af3743..d6b3784e2d9 100644
--- 
a/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json
+++ 
b/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json
@@ -25,7 +25,7 @@
   "componentProperties": {
     "requestValidationEnabled": { "index": 0, "kind": "property", 
"displayName": "Request Validation Enabled", "group": "common", "label": "", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": false, 
"description": "Enable validation of requests against the configured OpenAPI 
specification" },
     "bridgeErrorHandler": { "index": 1, "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": 2, "kind": "property", "displayName": 
"Missing Operation", "group": "consumer", "label": "consumer", "required": 
false, "type": "string", "javaType": "java.lang.String", "enum": [ "fail", 
"ignore", "dummy" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "fail", "description": "Whether the consumer should fail,ignore 
or return a dummy response for OpenAPI operations that are not mapped to a 
corresponding route." },
+    "missingOperation": { "index": 2, "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": 3, "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 [...]
     "restOpenapiProcessorStrategy": { "index": 4, "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" },
     "basePath": { "index": 5, "kind": "property", "displayName": "Base Path", 
"group": "producer", "label": "producer", "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." },
@@ -44,7 +44,7 @@
     "specificationUri": { "index": 0, "kind": "path", "displayName": 
"Specification Uri", "group": "common", "label": "common", "required": false, 
"type": "string", "javaType": "java.net.URI", "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 give [...]
     "operationId": { "index": 1, "kind": "path", "displayName": "Operation 
Id", "group": "producer", "label": "producer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "description": "ID of the operation from the OpenApi 
specification. This is required when using producer" },
     "requestValidationEnabled": { "index": 2, "kind": "parameter", 
"displayName": "Request Validation Enabled", "group": "common", "label": "", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": false, 
"description": "Enable validation of requests against the configured OpenAPI 
specification" },
-    "missingOperation": { "index": 3, "kind": "parameter", "displayName": 
"Missing Operation", "group": "consumer", "label": "consumer", "required": 
false, "type": "string", "javaType": "java.lang.String", "enum": [ "fail", 
"ignore", "dummy" ], "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "fail", "description": "Whether the consumer should fail,ignore 
or return a dummy response for OpenAPI operations that are not mapped to a 
corresponding route." },
+    "missingOperation": { "index": 3, "kind": "parameter", "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." },
     "bridgeErrorHandler": { "index": 4, "kind": "parameter", "displayName": 
"Bridge Error Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "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  [...]
     "consumerComponentName": { "index": 5, "kind": "parameter", "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 interfa [...]
     "exceptionHandler": { "index": 6, "kind": "parameter", "displayName": 
"Exception Handler", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", 
"deprecated": false, "autowired": false, "secret": false, "description": "To 
let the consumer use a custom ExceptionHandler. Notice if the option 
bridgeErrorHandler is enabled then this option is not in use. By def [...]
diff --git 
a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/DefaultRestOpenapiProcessorStrategy.java
 
b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/DefaultRestOpenapiProcessorStrategy.java
index f150912331e..40709fb260a 100644
--- 
a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/DefaultRestOpenapiProcessorStrategy.java
+++ 
b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/DefaultRestOpenapiProcessorStrategy.java
@@ -82,14 +82,27 @@ public class DefaultRestOpenapiProcessorStrategy extends 
ServiceSupport
                 throw new IllegalArgumentException(msg);
             } else if ("ignore".equalsIgnoreCase(missingOperation)) {
                 LOG.warn(msg + ". This validation error is ignored.");
-            } else if ("dev".equalsIgnoreCase(missingOperation)) {
-                LOG.warn(msg + ". This validation error is ignored when 
running in developer mode (profile=dev).");
+            } else if ("mock".equalsIgnoreCase(missingOperation)) {
+                LOG.debug(msg + ". This validation error is ignored (Will 
return a mocked/empty response).");
             }
         }
     }
 
     @Override
     public boolean process(Operation operation, String path, Exchange 
exchange, AsyncCallback callback) {
+        if ("mock".equalsIgnoreCase(missingOperation)) {
+            // check if there is a route
+            Endpoint e = camelContext.hasEndpoint(component + ":" + 
operation.getOperationId());
+            if (e == null) {
+                // no route for the given operation, so lets return an empty 
response
+                exchange.getMessage().setBody("");
+                // TODO: load canned response from classpath if exist
+                exchange.getMessage().setHeader(Exchange.HTTP_RESPONSE_CODE, 
204);
+                callback.done(true);
+                return true;
+            }
+        }
+
         Endpoint e = camelContext.getEndpoint(component + ":" + 
operation.getOperationId());
         AsyncProducer p = producerCache.acquireProducer(e);
         return p.process(exchange, doneSync -> {
@@ -138,7 +151,7 @@ public class DefaultRestOpenapiProcessorStrategy extends 
ServiceSupport
         // automatic adjust missing operation to fail, and ignore if you use 
developer mode
         if (missingOperation == null) {
             boolean dev = 
"dev".equalsIgnoreCase(camelContext.getCamelContextExtension().getProfile());
-            missingOperation = dev ? "dev" : "fail";
+            missingOperation = dev ? "mock" : "fail";
         }
     }
 
diff --git 
a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiComponent.java
 
b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiComponent.java
index e248acbc4aa..07dfb4556f1 100644
--- 
a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiComponent.java
+++ 
b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiComponent.java
@@ -141,8 +141,8 @@ public final class RestOpenApiComponent extends 
DefaultComponent implements SSLC
     private SSLContextParameters sslContextParameters;
     @Metadata(description = "To use a custom strategy for how to process Rest 
DSL requests", label = "consumer,advanced")
     private RestOpenapiProcessorStrategy restOpenapiProcessorStrategy = new 
DefaultRestOpenapiProcessorStrategy();
-    @Metadata(description = "Whether the consumer should fail,ignore or return 
a dummy response for OpenAPI operations that are not mapped to a corresponding 
route.",
-              enums = "fail,ignore,dummy", label = "consumer", defaultValue = 
"fail")
+    @Metadata(description = "Whether the consumer should fail,ignore or return 
a mock response for OpenAPI operations that are not mapped to a corresponding 
route.",
+              enums = "fail,ignore,mock", label = "consumer", defaultValue = 
"fail")
     private String missingOperation;
 
     public RestOpenApiComponent() {
diff --git 
a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java
 
b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java
index 9dbcd3df054..df8eeafa072 100644
--- 
a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java
+++ 
b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java
@@ -166,8 +166,8 @@ public final class RestOpenApiEndpoint extends 
DefaultEndpoint {
     private Map<String, Object> requestValidationLevels = new HashMap<>();
     @UriParam(description = "To use a custom strategy for how to process Rest 
DSL requests", label = "consumer,advanced")
     private RestOpenapiProcessorStrategy restOpenapiProcessorStrategy;
-    @UriParam(description = "Whether the consumer should fail,ignore or return 
a dummy response for OpenAPI operations that are not mapped to a corresponding 
route.",
-              enums = "fail,ignore,dummy", label = "consumer", defaultValue = 
"fail")
+    @UriParam(description = "Whether the consumer should fail,ignore or return 
a mock response for OpenAPI operations that are not mapped to a corresponding 
route.",
+              enums = "fail,ignore,mock", label = "consumer", defaultValue = 
"fail")
     private String missingOperation;
 
     public RestOpenApiEndpoint() {
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 077b716fab2..064b5f66d51 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
@@ -94,6 +94,23 @@ public interface RestOpenapiComponentBuilderFactory {
             doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
             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 RestOpenapiComponentBuilder missingOperation(
+                java.lang.String missingOperation) {
+            doSetProperty("missingOperation", missingOperation);
+            return this;
+        }
         /**
          * Name of the Camel component that will service the requests. The
          * component must be present in Camel registry and it must implement
@@ -359,6 +376,7 @@ public interface RestOpenapiComponentBuilderFactory {
             switch (name) {
             case "requestValidationEnabled": ((RestOpenApiComponent) 
component).setRequestValidationEnabled((boolean) 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;
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 d3545200a49..78546192e62 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
@@ -80,8 +80,8 @@ public interface RestOpenApiEndpointBuilderFactory {
             return this;
         }
         /**
-         * Whether the consumer should fail,ignore or return a dummy response
-         * for OpenAPI operations that are not mapped to a corresponding route.
+         * 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.
          * 
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 915720a83d6..a4e550f2223 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
@@ -84,7 +84,7 @@ public class RestOpenapiUriDsl(
   }
 
   /**
-   * Whether the consumer should fail,ignore or return a dummy response for 
OpenAPI operations that
+   * Whether the consumer should fail,ignore or return a mock response for 
OpenAPI operations that
    * are not mapped to a corresponding route.
    */
   public fun missingOperation(missingOperation: String) {

Reply via email to