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.git


The following commit(s) were added to refs/heads/main by this push:
     new ab8dd797ae8 rest-dsl openapi binding part 2 (#13691)
ab8dd797ae8 is described below

commit ab8dd797ae8bf5f4d979ac43c0dd1994e45bd179
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Apr 3 16:48:35 2024 +0200

    rest-dsl openapi binding part 2 (#13691)
    
    CAMEL-20557: Rest DSL to use openapi spec directly
---
 .../camel/catalog/components/rest-openapi.json     |  59 ++++-----
 ...mHttpRestOpenApiConsumerRestDslBindingTest.java |  43 +++++-
 .../openapi/RestOpenApiComponentConfigurer.java    |   6 +
 .../camel/component/rest/openapi/rest-openapi.json |  59 ++++-----
 .../rest/openapi/RestOpenApiComponent.java         |  18 ++-
 .../rest/openapi/RestOpenApiEndpoint.java          |  16 ++-
 .../rest/openapi/RestOpenApiProcessor.java         |  79 ++++++++++-
 .../apache/camel/model/rest/RestDefinition.java    |  26 ++--
 .../dsl/RestOpenapiComponentBuilderFactory.java    |  54 +++++---
 .../dsl/RestOpenApiEndpointBuilderFactory.java     | 144 ++++++---------------
 .../camel/kotlin/components/RestOpenapiUriDsl.kt   |  52 ++++----
 11 files changed, 326 insertions(+), 230 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 3179dafec36..41b59cebba5 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
@@ -27,39 +27,40 @@
     "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  [...]
     "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." }
+    "clientRequestValidation": { "index": 4, "kind": "property", 
"displayName": "Client Request Validation", "group": "consumer", "label": 
"consumer", "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" 
},
+    "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." },
+    "bindingPackageName": { "index": 6, "kind": "property", "displayName": 
"Binding Package Name", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "Java package name where POJO classes are located when using 
binding mode is enabled for JSon or XML. Multiple package names can be 
separated by comma." },
+    "consumerComponentName": { "index": 7, "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": 8, "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": 9, "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": 10, "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 na [...]
+    "lazyStartProducer": { "index": 11, "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": 12, "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": 13, "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": 14, "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": 15, "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": 16, "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  [...]
+    "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." }
   },
   "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  [...]
     "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" },
     "apiContextPath": { "index": 2, "kind": "parameter", "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" },
-    "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 [...]
-    "exchangePattern": { "index": 7, "kind": "parameter", "displayName": 
"Exchange Pattern", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], 
"deprecated": false, "autowired": false, "secret": false, "description": "Sets 
the exchange pattern when the consumer creates an exchange." },
-    "mockIncludePattern": { "index": 8, "kind": "parameter", "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 sep [...]
-    "restOpenapiProcessorStrategy": { "index": 9, "kind": "parameter", 
"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": 10, "kind": "parameter", "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 \/v3. Default 
is unset, if set overrides the value present in OpenApi specification and in 
the component configuration." },
-    "consumes": { "index": 11, "kind": "parameter", "displayName": "Consumes", 
"group": "producer", "label": "producer", "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 value of Accept HTTP  [...]
-    "host": { "index": 12, "kind": "parameter", "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 n [...]
-    "produces": { "index": 13, "kind": "parameter", "displayName": "Produces", 
"group": "producer", "label": "producer", "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 specification. Overr [...]
-    "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 [...]
-    "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" }
+    "clientRequestValidation": { "index": 3, "kind": "parameter", 
"displayName": "Client Request Validation", "group": "consumer", "label": 
"consumer", "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" 
},
+    "consumes": { "index": 4, "kind": "parameter", "displayName": "Consumes", 
"group": "consumer", "label": "consumer", "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 value of Accept HTTP h [...]
+    "missingOperation": { "index": 5, "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": 6, "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": 7, "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": 8, "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 [...]
+    "exchangePattern": { "index": 9, "kind": "parameter", "displayName": 
"Exchange Pattern", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], 
"deprecated": false, "autowired": false, "secret": false, "description": "Sets 
the exchange pattern when the consumer creates an exchange." },
+    "mockIncludePattern": { "index": 10, "kind": "parameter", "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 se [...]
+    "restOpenapiProcessorStrategy": { "index": 11, "kind": "parameter", 
"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": 12, "kind": "parameter", "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 \/v3. Default 
is unset, if set overrides the value present in OpenApi specification and in 
the component configuration." },
+    "host": { "index": 13, "kind": "parameter", "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 n [...]
+    "produces": { "index": 14, "kind": "parameter", "displayName": "Produces", 
"group": "producer", "label": "producer", "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 specification. Overr [...]
+    "requestValidationEnabled": { "index": 15, "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": 16, "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": 17, "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 [...]
   }
 }
diff --git 
a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/PlatformHttpRestOpenApiConsumerRestDslBindingTest.java
 
b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/PlatformHttpRestOpenApiConsumerRestDslBindingTest.java
index ab62516d8c6..548cfb9635f 100644
--- 
a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/PlatformHttpRestOpenApiConsumerRestDslBindingTest.java
+++ 
b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/PlatformHttpRestOpenApiConsumerRestDslBindingTest.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.platform.http.vertx;
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.platform.http.vertx.model.Pet;
+import org.apache.camel.component.rest.openapi.RestOpenApiComponent;
 import org.apache.camel.model.rest.RestBindingMode;
 import org.junit.jupiter.api.Test;
 
@@ -28,7 +29,7 @@ import static org.hamcrest.Matchers.equalTo;
 public class PlatformHttpRestOpenApiConsumerRestDslBindingTest {
 
     @Test
-    public void testRestOpenApi() throws Exception {
+    public void testRestOpenApiOutType() throws Exception {
         final CamelContext context = 
VertxPlatformHttpEngineTest.createCamelContext();
 
         try {
@@ -65,4 +66,44 @@ public class 
PlatformHttpRestOpenApiConsumerRestDslBindingTest {
         }
     }
 
+    @Test
+    public void testRestOpenApiInType() throws Exception {
+        final CamelContext context = 
VertxPlatformHttpEngineTest.createCamelContext();
+
+        try {
+            context.addRoutes(new RouteBuilder() {
+                @Override
+                public void configure() {
+                    // TODO: make it easy to set binding package name
+                    RestOpenApiComponent rac = 
context.getComponent("rest-openapi", RestOpenApiComponent.class);
+                    rac.setBindingPackageName(Pet.class.getPackageName());
+
+                    restConfiguration().bindingMode(RestBindingMode.json);
+
+                    
rest().openApi().specification("openapi-v3.json").missingOperation("ignore");
+
+                    from("direct:updatePet")
+                            .process(e -> {
+                                Pet pet = e.getMessage().getBody(Pet.class);
+                                pet.setStatus(Pet.Status.PENDING);
+                            });
+                }
+            });
+
+            context.start();
+
+            given()
+                    .when()
+                    .contentType("application/json")
+                    .body("{\"id\":123,\"name\":\"tony the tiger\"}")
+                    .put("/api/v3/pet")
+                    .then()
+                    .statusCode(200)
+                    .body(equalTo("{\"id\":123,\"name\":\"tony the 
tiger\",\"status\":\"PENDING\"}"));
+
+        } finally {
+            context.stop();
+        }
+    }
+
 }
diff --git 
a/components/camel-rest-openapi/src/generated/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentConfigurer.java
 
b/components/camel-rest-openapi/src/generated/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentConfigurer.java
index a4da07cffbb..4b19529401f 100644
--- 
a/components/camel-rest-openapi/src/generated/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentConfigurer.java
+++ 
b/components/camel-rest-openapi/src/generated/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentConfigurer.java
@@ -27,6 +27,8 @@ public class RestOpenApiComponentConfigurer extends 
PropertyConfigurerSupport im
         case "autowiredEnabled": 
target.setAutowiredEnabled(property(camelContext, boolean.class, value)); 
return true;
         case "basepath":
         case "basePath": target.setBasePath(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "bindingpackagename":
+        case "bindingPackageName": 
target.setBindingPackageName(property(camelContext, java.lang.String.class, 
value)); return true;
         case "bridgeerrorhandler":
         case "bridgeErrorHandler": 
target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); 
return true;
         case "clientrequestvalidation":
@@ -67,6 +69,8 @@ public class RestOpenApiComponentConfigurer extends 
PropertyConfigurerSupport im
         case "autowiredEnabled": return boolean.class;
         case "basepath":
         case "basePath": return java.lang.String.class;
+        case "bindingpackagename":
+        case "bindingPackageName": return java.lang.String.class;
         case "bridgeerrorhandler":
         case "bridgeErrorHandler": return boolean.class;
         case "clientrequestvalidation":
@@ -108,6 +112,8 @@ public class RestOpenApiComponentConfigurer extends 
PropertyConfigurerSupport im
         case "autowiredEnabled": return target.isAutowiredEnabled();
         case "basepath":
         case "basePath": return target.getBasePath();
+        case "bindingpackagename":
+        case "bindingPackageName": return target.getBindingPackageName();
         case "bridgeerrorhandler":
         case "bridgeErrorHandler": return target.isBridgeErrorHandler();
         case "clientrequestvalidation":
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 3179dafec36..41b59cebba5 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
@@ -27,39 +27,40 @@
     "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  [...]
     "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." }
+    "clientRequestValidation": { "index": 4, "kind": "property", 
"displayName": "Client Request Validation", "group": "consumer", "label": 
"consumer", "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" 
},
+    "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." },
+    "bindingPackageName": { "index": 6, "kind": "property", "displayName": 
"Binding Package Name", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "Java package name where POJO classes are located when using 
binding mode is enabled for JSon or XML. Multiple package names can be 
separated by comma." },
+    "consumerComponentName": { "index": 7, "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": 8, "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": 9, "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": 10, "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 na [...]
+    "lazyStartProducer": { "index": 11, "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": 12, "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": 13, "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": 14, "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": 15, "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": 16, "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  [...]
+    "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." }
   },
   "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  [...]
     "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" },
     "apiContextPath": { "index": 2, "kind": "parameter", "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" },
-    "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 [...]
-    "exchangePattern": { "index": 7, "kind": "parameter", "displayName": 
"Exchange Pattern", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], 
"deprecated": false, "autowired": false, "secret": false, "description": "Sets 
the exchange pattern when the consumer creates an exchange." },
-    "mockIncludePattern": { "index": 8, "kind": "parameter", "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 sep [...]
-    "restOpenapiProcessorStrategy": { "index": 9, "kind": "parameter", 
"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": 10, "kind": "parameter", "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 \/v3. Default 
is unset, if set overrides the value present in OpenApi specification and in 
the component configuration." },
-    "consumes": { "index": 11, "kind": "parameter", "displayName": "Consumes", 
"group": "producer", "label": "producer", "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 value of Accept HTTP  [...]
-    "host": { "index": 12, "kind": "parameter", "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 n [...]
-    "produces": { "index": 13, "kind": "parameter", "displayName": "Produces", 
"group": "producer", "label": "producer", "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 specification. Overr [...]
-    "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 [...]
-    "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" }
+    "clientRequestValidation": { "index": 3, "kind": "parameter", 
"displayName": "Client Request Validation", "group": "consumer", "label": 
"consumer", "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" 
},
+    "consumes": { "index": 4, "kind": "parameter", "displayName": "Consumes", 
"group": "consumer", "label": "consumer", "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 value of Accept HTTP h [...]
+    "missingOperation": { "index": 5, "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": 6, "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": 7, "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": 8, "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 [...]
+    "exchangePattern": { "index": 9, "kind": "parameter", "displayName": 
"Exchange Pattern", "group": "consumer (advanced)", "label": 
"consumer,advanced", "required": false, "type": "object", "javaType": 
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], 
"deprecated": false, "autowired": false, "secret": false, "description": "Sets 
the exchange pattern when the consumer creates an exchange." },
+    "mockIncludePattern": { "index": 10, "kind": "parameter", "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 se [...]
+    "restOpenapiProcessorStrategy": { "index": 11, "kind": "parameter", 
"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": 12, "kind": "parameter", "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 \/v3. Default 
is unset, if set overrides the value present in OpenApi specification and in 
the component configuration." },
+    "host": { "index": 13, "kind": "parameter", "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 n [...]
+    "produces": { "index": 14, "kind": "parameter", "displayName": "Produces", 
"group": "producer", "label": "producer", "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 specification. Overr [...]
+    "requestValidationEnabled": { "index": 15, "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": 16, "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": 17, "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 [...]
   }
 }
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 28afc8d3fd9..b501c5eb372 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
@@ -29,7 +29,6 @@ import org.apache.camel.support.jsse.SSLContextParameters;
 
 import static 
org.apache.camel.component.rest.openapi.RestOpenApiHelper.isHostParam;
 import static 
org.apache.camel.component.rest.openapi.RestOpenApiHelper.isMediaRange;
-import static org.apache.camel.util.StringHelper.notEmpty;
 
 /**
  * An awesome REST component backed by OpenApi specifications. Creates 
endpoints that connect to REST APIs defined by
@@ -121,7 +120,10 @@ public final class RestOpenApiComponent extends 
DefaultComponent implements SSLC
                             + " any value present in the OpenApi 
specification. Can be overridden in endpoint configuration.",
               label = "producer,advanced")
     private String produces;
-    @Metadata(label = "consumes",
+    @Metadata(label = "consumer,advanced",
+              description = "Java package name where POJO classes are located 
when using binding mode is enabled for JSon or XML. Multiple package names can 
be separated by comma.")
+    private String bindingPackageName;
+    @Metadata(label = "consumer",
               description = "Whether to enable validation of the client 
request to check if the incoming request is valid according to the OpenAPI 
specification")
     private boolean clientRequestValidation;
     @Metadata(label = "producer", description = "Enable validation of requests 
against the configured OpenAPI specification")
@@ -155,6 +157,7 @@ public final class RestOpenApiComponent extends 
DefaultComponent implements SSLC
             throws Exception {
         RestOpenApiEndpoint endpoint = new RestOpenApiEndpoint(uri, remaining, 
this, parameters);
         endpoint.setApiContextPath(getApiContextPath());
+        endpoint.setBindingPackageName(getBindingPackageName());
         endpoint.setClientRequestValidation(isClientRequestValidation());
         endpoint.setRequestValidationEnabled(isRequestValidationEnabled());
         
endpoint.setRestOpenapiProcessorStrategy(getRestOpenapiProcessorStrategy());
@@ -234,11 +237,11 @@ public final class RestOpenApiComponent extends 
DefaultComponent implements SSLC
     }
 
     public void setBasePath(final String basePath) {
-        this.basePath = notEmpty(basePath, "basePath");
+        this.basePath = basePath;
     }
 
     public void setComponentName(final String componentName) {
-        this.componentName = notEmpty(componentName, "componentName");
+        this.componentName = componentName;
     }
 
     public void setConsumerComponentName(String consumerComponentName) {
@@ -286,4 +289,11 @@ public final class RestOpenApiComponent extends 
DefaultComponent implements SSLC
         this.clientRequestValidation = clientRequestValidation;
     }
 
+    public String getBindingPackageName() {
+        return bindingPackageName;
+    }
+
+    public void setBindingPackageName(String bindingPackageName) {
+        this.bindingPackageName = bindingPackageName;
+    }
 }
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 d271c37924d..d2ee8cfe72b 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
@@ -60,6 +60,7 @@ import org.apache.camel.Producer;
 import 
org.apache.camel.component.rest.openapi.validator.DefaultRequestValidator;
 import org.apache.camel.component.rest.openapi.validator.RequestValidator;
 import org.apache.camel.component.rest.openapi.validator.RestOpenApiOperation;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.Resource;
 import org.apache.camel.spi.RestConfiguration;
 import org.apache.camel.spi.RestOpenApiConsumerFactory;
@@ -129,7 +130,7 @@ public final class RestOpenApiEndpoint extends 
DefaultEndpoint {
                             + " 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",
-              label = "producer")
+              label = "consumer")
     private String consumes;
     @UriParam(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"
@@ -148,7 +149,10 @@ public final class RestOpenApiEndpoint extends 
DefaultEndpoint {
              defaultValue = RestOpenApiComponent.DEFAULT_SPECIFICATION_URI,
              defaultValueNote = "By default loads `openapi.json` file", label 
= "common")
     private String specificationUri;
-    @UriParam(label = "consumes",
+    @Metadata(label = "consumer,advanced",
+              description = "Java package name where POJO classes are located 
when using binding mode is enabled for JSon or XML. Multiple package names can 
be separated by comma.")
+    private String bindingPackageName;
+    @UriParam(label = "consumer",
               description = "Whether to enable validation of the client 
request to check if the incoming request is valid according to the OpenAPI 
specification")
     private boolean clientRequestValidation;
     @UriParam(label = "producer", description = "Enable validation of requests 
against the configured OpenAPI specification")
@@ -460,6 +464,14 @@ public final class RestOpenApiEndpoint extends 
DefaultEndpoint {
         this.apiContextPath = apiContextPath;
     }
 
+    public String getBindingPackageName() {
+        return bindingPackageName;
+    }
+
+    public void setBindingPackageName(String bindingPackageName) {
+        this.bindingPackageName = bindingPackageName;
+    }
+
     Producer createProducerFor(
             final OpenAPI openapi, final Operation operation, final String 
method,
             final String uriTemplate)
diff --git 
a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiProcessor.java
 
b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiProcessor.java
index c3e46f12ce4..42bac9d22e9 100644
--- 
a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiProcessor.java
+++ 
b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiProcessor.java
@@ -28,6 +28,7 @@ import java.util.stream.Collectors;
 import io.swagger.v3.oas.models.OpenAPI;
 import io.swagger.v3.oas.models.Operation;
 import io.swagger.v3.oas.models.media.Content;
+import io.swagger.v3.oas.models.media.Schema;
 import io.swagger.v3.oas.models.parameters.Parameter;
 import org.apache.camel.AsyncCallback;
 import org.apache.camel.CamelContext;
@@ -398,7 +399,6 @@ public class RestOpenApiProcessor extends 
DelegateAsyncProcessor implements Came
         if (requiredHeaders != null) {
             bc.setRequiredHeaders(requiredHeaders);
         }
-        // TODO: should type be string/int/long for basic types?
         Map<String, String> defaultQueryValues = null;
         if (o.getParameters() != null) {
             defaultQueryValues = o.getParameters().stream()
@@ -411,11 +411,86 @@ public class RestOpenApiProcessor extends 
DelegateAsyncProcessor implements Came
             bc.setQueryDefaultValues(defaultQueryValues);
         }
 
-        // TODO: type/outType
+        // input and output types binding to java classes
+        if (o.getRequestBody() != null) {
+            Content c = o.getRequestBody().getContent();
+            if (c != null) {
+                for (var m : c.entrySet()) {
+                    String mt = m.getKey();
+                    if (mt.contains("json") || mt.contains("xml")) {
+                        Schema s = m.getValue().getSchema();
+                        // $ref is null, so we need to know the schema name 
via XML
+                        if (s != null && s.getXml() != null) {
+                            String ref = s.getXml().getName();
+                            boolean array = "array".equals(s.getType());
+                            if (ref != null) {
+                                Class<?> clazz = 
loadBindingClass(camelContext, ref);
+                                if (clazz != null) {
+                                    String name = clazz.getName();
+                                    if (array) {
+                                        name = name + "[]";
+                                    }
+                                    bc.setType(name);
+                                    break; // okay set this just once
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        if (o.getResponses() != null) {
+            for (var a : o.getResponses().values()) {
+                Content c = a.getContent();
+                if (c != null) {
+                    for (var m : c.entrySet()) {
+                        String mt = m.getKey();
+                        if (mt.contains("json") || mt.contains("xml")) {
+                            Schema s = m.getValue().getSchema();
+                            // $ref is null, so we need to know the schema 
name via XML
+                            if (s != null && s.getXml() != null) {
+                                String ref = s.getXml().getName();
+                                boolean array = "array".equals(s.getType());
+                                if (ref != null) {
+                                    Class<?> clazz = 
loadBindingClass(camelContext, ref);
+                                    if (clazz != null) {
+                                        String name = clazz.getName();
+                                        if (array) {
+                                            name = name + "[]";
+                                        }
+                                        bc.setOutType(name);
+                                        break; // okay set this just once
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
 
         return RestBindingAdviceFactory.build(camelContext, bc);
     }
 
+    private Class<?> loadBindingClass(CamelContext camelContext, String ref) {
+        if (ref == null) {
+            return null;
+        }
+
+        // must refer to a class name, so upper case
+        ref = Character.toUpperCase(ref.charAt(0)) + ref.substring(1);
+        if (endpoint.getBindingPackageName() != null) {
+            for (String pck : endpoint.getBindingPackageName().split(",")) {
+                String fqn = pck + "." + ref;
+                Class<?> clazz = 
camelContext.getClassResolver().resolveClass(fqn);
+                if (clazz != null) {
+                    return clazz;
+                }
+            }
+        }
+        return camelContext.getClassResolver().resolveClass(ref);
+    }
+
     @Override
     protected void doInit() throws Exception {
         super.doInit();
diff --git 
a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java
 
b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java
index 03a6ecfa264..427f8136202 100644
--- 
a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java
+++ 
b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java
@@ -980,20 +980,22 @@ public class RestDefinition extends 
OptionalIdentifiedDefinition<RestDefinition>
         // add dummy empty stop
         route.getOutputs().add(new StopDefinition());
 
+        String mode = getBindingMode();
+        if (mode == null) {
+            mode = camelContext.getRestConfiguration().getBindingMode().name();
+        }
+
         RestBindingDefinition binding = new RestBindingDefinition();
         binding.setComponent(component);
-        if (binding.getBindingMode() != null) {
-            String mode = binding.getBindingMode();
-            if ("json".equals(mode)) {
-                binding.setConsumes("application/json");
-                binding.setProduces("application/json");
-            } else if ("xml".equals(mode)) {
-                binding.setConsumes("application/xml");
-                binding.setProduces("application/xml");
-            } else if ("json_xml".equals(mode)) {
-                binding.setConsumes("application/json;application/xml");
-                binding.setProduces("application/json;application/xml");
-            }
+        if ("json".equals(mode)) {
+            binding.setConsumes("application/json");
+            binding.setProduces("application/json");
+        } else if ("xml".equals(mode)) {
+            binding.setConsumes("application/xml");
+            binding.setProduces("application/xml");
+        } else if ("json_xml".equals(mode)) {
+            binding.setConsumes("application/json;application/xml");
+            binding.setProduces("application/json;application/xml");
         }
         binding.setSkipBindingOnErrorCode(getSkipBindingOnErrorCode());
         binding.setClientRequestValidation(getClientRequestValidation());
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 86525023dd1..be5ea7fb6fa 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
@@ -130,6 +130,23 @@ public interface RestOpenapiComponentBuilderFactory {
             doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
             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: consumer
+         * 
+         * @param clientRequestValidation the value to set
+         * @return the dsl builder
+         */
+        default RestOpenapiComponentBuilder clientRequestValidation(
+                boolean clientRequestValidation) {
+            doSetProperty("clientRequestValidation", clientRequestValidation);
+            return this;
+        }
         /**
          * Whether the consumer should fail,ignore or return a mock response 
for
          * OpenAPI operations that are not mapped to a corresponding route.
@@ -147,6 +164,23 @@ public interface RestOpenapiComponentBuilderFactory {
             doSetProperty("missingOperation", missingOperation);
             return this;
         }
+        /**
+         * Java package name where POJO classes are located when using binding
+         * mode is enabled for JSon or XML. Multiple package names can be
+         * separated by comma.
+         * 
+         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
+         * 
+         * Group: consumer (advanced)
+         * 
+         * @param bindingPackageName the value to set
+         * @return the dsl builder
+         */
+        default RestOpenapiComponentBuilder bindingPackageName(
+                java.lang.String bindingPackageName) {
+            doSetProperty("bindingPackageName", bindingPackageName);
+            return this;
+        }
         /**
          * Name of the Camel component that will service the requests. The
          * component must be present in Camel registry and it must implement
@@ -339,23 +373,6 @@ public interface RestOpenapiComponentBuilderFactory {
             doSetProperty("autowiredEnabled", autowiredEnabled);
             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 RestOpenapiComponentBuilder clientRequestValidation(
-                boolean clientRequestValidation) {
-            doSetProperty("clientRequestValidation", clientRequestValidation);
-            return this;
-        }
         /**
          * Customize TLS parameters used by the component. If not set defaults
          * to the TLS parameters set in the Camel context.
@@ -410,7 +427,9 @@ public interface RestOpenapiComponentBuilderFactory {
             case "specificationUri": ((RestOpenApiComponent) 
component).setSpecificationUri((java.lang.String) value); return true;
             case "apiContextPath": ((RestOpenApiComponent) 
component).setApiContextPath((java.lang.String) value); return true;
             case "bridgeErrorHandler": ((RestOpenApiComponent) 
component).setBridgeErrorHandler((boolean) value); return true;
+            case "clientRequestValidation": ((RestOpenApiComponent) 
component).setClientRequestValidation((boolean) value); return true;
             case "missingOperation": ((RestOpenApiComponent) 
component).setMissingOperation((java.lang.String) value); return true;
+            case "bindingPackageName": ((RestOpenApiComponent) 
component).setBindingPackageName((java.lang.String) value); return true;
             case "consumerComponentName": ((RestOpenApiComponent) 
component).setConsumerComponentName((java.lang.String) value); return true;
             case "mockIncludePattern": ((RestOpenApiComponent) 
component).setMockIncludePattern((java.lang.String) value); return true;
             case "restOpenapiProcessorStrategy": ((RestOpenApiComponent) 
component).setRestOpenapiProcessorStrategy((org.apache.camel.component.rest.openapi.RestOpenapiProcessorStrategy)
 value); return true;
@@ -421,7 +440,6 @@ public interface RestOpenapiComponentBuilderFactory {
             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 "clientRequestValidation": ((RestOpenApiComponent) 
component).setClientRequestValidation((boolean) 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;
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