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 4fef79103ad CAMEL-19499: camel-yaml-dsl: Missing rest-configuration in
YAML DSL schema (#10491)
4fef79103ad is described below
commit 4fef79103ada6bdfd6bbb356a034c87154e50fc0
Author: Tomohisa Igarashi <[email protected]>
AuthorDate: Tue Jun 27 03:02:28 2023 -0400
CAMEL-19499: camel-yaml-dsl: Missing rest-configuration in YAML DSL schema
(#10491)
---
.../org/apache/camel/catalog/models/beans.json | 11 +-
.../org/apache/camel/catalog/models/camel.json | 11 +-
.../apache/camel/catalog/schemas/camel-spring.xsd | 1051 ++++++++++----------
.../org/apache/camel/model/app/beans.json | 11 +-
.../org/apache/camel/model/app/camel.json | 11 +-
.../apache/camel/model/app/BeansDefinition.java | 12 +
.../java/org/apache/camel/xml/in/ModelParser.java | 81 +-
.../java/org/apache/camel/xml/out/ModelWriter.java | 1 +
.../org/apache/camel/yaml/out/ModelWriter.java | 1 +
.../dsl/yaml/deserializers/ModelDeserializers.java | 13 +
.../dsl/yaml/GenerateYamlDeserializersMojo.java | 3 +
.../generated/resources/schema/camel-yaml-dsl.json | 18 +
.../generated/resources/schema/camelYamlDsl.json | 15 +
13 files changed, 654 insertions(+), 585 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/beans.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/beans.json
index bd3ae76b593..83f307b302d 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/beans.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/beans.json
@@ -14,10 +14,11 @@
"properties": {
"component-scan": { "index": 0, "kind": "element", "displayName":
"Component-scan", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.app.ComponentScanDefinition>",
"deprecated": false, "autowired": false, "secret": false, "description":
"Component scanning definition(s). But unlike
package\/packageScan\/contextScan, we're not scanning only for
org.apache.camel.builder.RouteBuilder." },
"bean": { "index": 1, "kind": "element", "displayName": "Bean",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.app.RegistryBeanDefinition>",
"deprecated": false, "autowired": false, "secret": false },
- "rest": { "index": 2, "kind": "element", "displayName": "Rest",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.rest.RestDefinition>", "deprecated":
false, "autowired": false, "secret": false },
- "routeConfiguration": { "index": 3, "kind": "element", "displayName":
"Route Configuration", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteConfigurationDefinition>",
"deprecated": false, "autowired": false, "secret": false },
- "routeTemplate": { "index": 4, "kind": "element", "displayName": "Route
Template", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteTemplateDefinition>", "deprecated":
false, "autowired": false, "secret": false },
- "templatedRoute": { "index": 5, "kind": "element", "displayName":
"Templated Route", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.TemplatedRouteDefinition>",
"deprecated": false, "autowired": false, "secret": false },
- "route": { "index": 6, "kind": "element", "displayName": "Route",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteDefinition>", "deprecated": false,
"autowired": false, "secret": false }
+ "restConfiguration": { "index": 2, "kind": "element", "displayName": "Rest
Configuration", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.rest.RestConfigurationDefinition>",
"deprecated": false, "autowired": false, "secret": false },
+ "rest": { "index": 3, "kind": "element", "displayName": "Rest",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.rest.RestDefinition>", "deprecated":
false, "autowired": false, "secret": false },
+ "routeConfiguration": { "index": 4, "kind": "element", "displayName":
"Route Configuration", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteConfigurationDefinition>",
"deprecated": false, "autowired": false, "secret": false },
+ "routeTemplate": { "index": 5, "kind": "element", "displayName": "Route
Template", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteTemplateDefinition>", "deprecated":
false, "autowired": false, "secret": false },
+ "templatedRoute": { "index": 6, "kind": "element", "displayName":
"Templated Route", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.TemplatedRouteDefinition>",
"deprecated": false, "autowired": false, "secret": false },
+ "route": { "index": 7, "kind": "element", "displayName": "Route",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteDefinition>", "deprecated": false,
"autowired": false, "secret": false }
}
}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/camel.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/camel.json
index 9bba2b8258a..12af847b484 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/camel.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/camel.json
@@ -14,10 +14,11 @@
"properties": {
"component-scan": { "index": 0, "kind": "element", "displayName":
"Component-scan", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.app.ComponentScanDefinition>",
"deprecated": false, "autowired": false, "secret": false, "description":
"Component scanning definition(s). But unlike
package\/packageScan\/contextScan, we're not scanning only for
org.apache.camel.builder.RouteBuilder." },
"bean": { "index": 1, "kind": "element", "displayName": "Bean",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.app.RegistryBeanDefinition>",
"deprecated": false, "autowired": false, "secret": false },
- "rest": { "index": 2, "kind": "element", "displayName": "Rest",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.rest.RestDefinition>", "deprecated":
false, "autowired": false, "secret": false },
- "routeConfiguration": { "index": 3, "kind": "element", "displayName":
"Route Configuration", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteConfigurationDefinition>",
"deprecated": false, "autowired": false, "secret": false },
- "routeTemplate": { "index": 4, "kind": "element", "displayName": "Route
Template", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteTemplateDefinition>", "deprecated":
false, "autowired": false, "secret": false },
- "templatedRoute": { "index": 5, "kind": "element", "displayName":
"Templated Route", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.TemplatedRouteDefinition>",
"deprecated": false, "autowired": false, "secret": false },
- "route": { "index": 6, "kind": "element", "displayName": "Route",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteDefinition>", "deprecated": false,
"autowired": false, "secret": false }
+ "restConfiguration": { "index": 2, "kind": "element", "displayName": "Rest
Configuration", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.rest.RestConfigurationDefinition>",
"deprecated": false, "autowired": false, "secret": false },
+ "rest": { "index": 3, "kind": "element", "displayName": "Rest",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.rest.RestDefinition>", "deprecated":
false, "autowired": false, "secret": false },
+ "routeConfiguration": { "index": 4, "kind": "element", "displayName":
"Route Configuration", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteConfigurationDefinition>",
"deprecated": false, "autowired": false, "secret": false },
+ "routeTemplate": { "index": 5, "kind": "element", "displayName": "Route
Template", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteTemplateDefinition>", "deprecated":
false, "autowired": false, "secret": false },
+ "templatedRoute": { "index": 6, "kind": "element", "displayName":
"Templated Route", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.TemplatedRouteDefinition>",
"deprecated": false, "autowired": false, "secret": false },
+ "route": { "index": 7, "kind": "element", "displayName": "Route",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteDefinition>", "deprecated": false,
"autowired": false, "secret": false }
}
}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index 4616bc9c742..649a953edab 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -13512,6 +13512,7 @@ org.apache.camel.builder.RouteBuilder.
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="bean"
type="tns:registryBeanDefinition"/>
<xs:any maxOccurs="unbounded" minOccurs="0" namespace="##other"
processContents="skip"/>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
ref="tns:restConfiguration"/>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:rest"/>
<xs:element maxOccurs="unbounded" minOccurs="0"
ref="tns:routeConfiguration"/>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:routeTemplate"/>
@@ -13530,6 +13531,309 @@ org.apache.camel.builder.RouteBuilder.
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="type" type="xs:string"/>
</xs:complexType>
+ <xs:complexType name="restConfigurationDefinition">
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="componentProperty"
type="tns:restPropertyDefinition">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Allows to configure as many additional properties for the rest component in
use.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="endpointProperty"
type="tns:restPropertyDefinition">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Allows to configure as many additional properties for the rest endpoint in use.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="consumerProperty"
type="tns:restPropertyDefinition">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Allows to configure as many additional properties for the rest consumer in use.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0"
name="dataFormatProperty" type="tns:restPropertyDefinition">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Allows to configure as many additional properties for the data formats in use.
For example set property prettyPrint to
+true to have json outputted in pretty mode. The properties can be prefixed to
denote the option is only for either JSON
+or XML and for either the IN or the OUT. The prefixes are: json.in. json.out.
xml.in. xml.out. For example a key with
+value xml.out.mustBeJAXBElement is only for the XML data format for the
outgoing. A key without a prefix is a common key
+for all situations.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="apiProperty"
type="tns:restPropertyDefinition">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Allows to configure as many additional properties for the api documentation.
For example set property api.title to my
+cool stuff.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element maxOccurs="unbounded" minOccurs="0" name="corsHeaders"
type="tns:restPropertyDefinition">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Allows to configure custom CORS headers.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="component" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+The Camel Rest component to use for the REST transport (consumer), such as
netty-http, jetty, servlet, undertow. If no
+component has been explicit configured, then Camel will lookup if there is a
Camel component that integrates with the
+Rest DSL, or if a org.apache.camel.spi.RestConsumerFactory is registered in
the registry. If either one is found, then
+that is being used.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="apiComponent" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+The name of the Camel component to use as the REST API. If no API Component
has been explicit configured, then Camel
+will lookup if there is a Camel component responsible for servicing and
generating the REST API documentation, or if a
+org.apache.camel.spi.RestApiProcessorFactory is registered in the registry. If
either one is found, then that is being
+used.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="producerComponent" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Sets the name of the Camel component to use as the REST producer.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="scheme" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+The scheme to use for exposing the REST service. Usually http or https is
supported. The default value is http.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="host" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+The hostname to use for exposing the REST service.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="port" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+The port number to use for exposing the REST service. Notice if you use
servlet component then the port number
+configured here does not apply, as the port number in use is the actual port
number the servlet component is using. eg
+if using Apache Tomcat its the tomcat http port, if using Apache Karaf its the
HTTP service in Karaf that uses port 8181
+by default etc. Though in those situations setting the port number here,
allows tooling and JMX to know the port number,
+so its recommended to set the port number to the number that the servlet
engine uses.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="apiHost" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+To use a specific hostname for the API documentation (such as swagger or
openapi) This can be used to override the
+generated host with this configured hostname.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="useXForwardHeaders" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Whether to use X-Forward headers for Host and related setting. The default
value is true. Default value: true
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="producerApiDoc" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Sets the location of the api document the REST producer will use to validate
the REST uri and query parameters are valid
+accordingly to the api document. The location of the api document is loaded
from classpath by default, but you can use
+file: or http: to refer to resources to load from file or http url.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="contextPath" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Sets a leading context-path the REST services will be using. This can be used
when using components such as
+camel-servlet where the deployed web application is deployed using a
context-path. Or for components such as camel-jetty
+or camel-netty-http that includes a HTTP server.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="apiContextPath" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Sets a leading API context-path the REST API services will be using. This can
be used when using components such as
+camel-servlet where the deployed web application is deployed using a
context-path.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="apiContextRouteId" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Sets the route id to use for the route that services the REST API. The route
will by default use an auto assigned route
+id.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="apiVendorExtension" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Whether vendor extension is enabled in the Rest APIs. If enabled then Camel
will include additional information as
+vendor extension (eg keys starting with x-) such as route ids, class names
etc. Not all 3rd party API gateways and tools
+supports vendor-extensions when importing your API docs. Default value: false
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="hostNameResolver" type="tns:restHostNameResolver">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+If no hostname has been explicit configured, then this resolver is used to
compute the hostname the REST service will be
+using. Default value: allLocalIp
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="bindingMode" type="tns:restBindingMode">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Sets the binding mode to use. The default value is off. Default value: off
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="skipBindingOnErrorCode" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Whether to skip binding on output if there is a custom HTTP error code header.
This allows to build custom error
+messages that do not bind to json / xml etc, as success messages otherwise
will do. Default value: false
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="clientRequestValidation" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Whether to enable validation of the client request to check: 1) Content-Type
header matches what the Rest DSL consumes;
+returns HTTP Status 415 if validation error. 2) Accept header matches what the
Rest DSL produces; returns HTTP Status
+406 if validation error. 3) Missing required data (query parameters, HTTP
headers, body); returns HTTP Status 400 if
+validation error. 4) Parsing error of the message body (JSon, XML or Auto
binding mode must be enabled); returns HTTP
+Status 400 if validation error. Default value: false
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="enableCORS" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Whether to enable CORS headers in the HTTP response. The default value is
false. Default value: false
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="inlineRoutes" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Inline routes in rest-dsl which are linked using direct endpoints. By default,
each service in Rest DSL is an individual
+route, meaning that you would have at least two routes per service (rest-dsl,
and the route linked from rest-dsl).
+Enabling this allows Camel to optimize and inline this as a single route,
however this requires to use direct endpoints,
+which must be unique per service. This option is default false. Default value:
false
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="jsonDataFormat" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Name of specific json data format to use. By default jackson will be used.
Important: This option is only for setting a
+custom name of the data format, not to refer to an existing data format
instance.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="xmlDataFormat" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Name of specific XML data format to use. By default jaxb will be used.
Important: This option is only for setting a
+custom name of the data format, not to refer to an existing data format
instance.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name="restPropertyDefinition">
+ <xs:sequence/>
+ <xs:attribute name="key" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Property key.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="value" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Property value.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
<xs:complexType name="restDefinition">
<xs:complexContent>
<xs:extension base="tns:optionalIdentifiedDefinition">
@@ -13812,27 +14116,6 @@ The flow used by the OAuth2 security scheme. Valid
values are implicit, password
</xs:extension>
</xs:complexContent>
</xs:complexType>
- <xs:complexType name="restPropertyDefinition">
- <xs:sequence/>
- <xs:attribute name="key" type="xs:string" use="required">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Property key.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="value" type="xs:string" use="required">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Property value.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
<xs:complexType name="openIdConnectDefinition">
<xs:complexContent>
<xs:extension base="tns:restSecurityDefinition">
@@ -15555,542 +15838,281 @@ group to support dynamic group sizes.
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="groupDelimiter" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Sets the delimiter to use when grouping. If this has not been set then token
will be used as the delimiter.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="skipFirst" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-To skip the very first element. Default value: false
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- <xs:complexType name="xmlTokenizerExpression">
- <xs:simpleContent>
- <xs:extension base="tns:namespaceAwareExpression">
- <xs:attribute name="mode" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-The extraction mode. The available extraction modes are: i - injecting the
contextual namespace bindings into the
-extracted token (default) w - wrapping the extracted token in its ancestor
context u - unwrapping the extracted token to
-its child content t - extracting the text content of the specified element.
Default value: i
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="group" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-To group N parts together.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- <xs:complexType name="xPathExpression">
- <xs:simpleContent>
- <xs:extension base="tns:namespaceAwareExpression">
- <xs:attribute name="documentType" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Name of class for document type The default value is org.w3c.dom.Document.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="resultType" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Sets the class name of the result type (type from output) The default result
type is NodeSet. Default value: NODESET
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="saxon" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Whether to use Saxon. Default value: false
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="factoryRef" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-References to a custom XPathFactory to lookup in the registry.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="objectModel" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-The XPath object model to use.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="logNamespaces" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Whether to log namespaces which can assist during troubleshooting. Default
value: false
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="threadSafety" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Whether to enable thread-safety for the returned result of the xpath
expression. This applies to when using NODESET as
-the result type, and the returned set has multiple elements. In this situation
there can be thread-safety issues if you
-process the NODESET concurrently such as from a Camel Splitter EIP in parallel
processing mode. This option prevents
-concurrency issues by doing defensive copies of the nodes. It is recommended
to turn this option on if you are using
-camel-saxon or Saxon in your application. Saxon has thread-safety issues which
can be prevented by turning this option
-on. Default value: false
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="preCompile" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Whether to enable pre-compiling the xpath expression during initialization
phase. pre-compile is enabled by default.
-This can be used to turn off, for example in cases the compilation phase is
desired at the starting phase, such as if
-the application is ahead of time compiled (for example with camel-quarkus)
which would then load the xpath factory of
-the built operating system, and not a JVM runtime. Default value: true
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- <xs:complexType name="xQueryExpression">
- <xs:simpleContent>
- <xs:extension base="tns:namespaceAwareExpression">
- <xs:attribute name="resultType" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Sets the class of the result type (type from output).
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="type" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Sets the class name of the result type (type from output) The default result
type is NodeSet.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="configurationRef" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Reference to a saxon configuration instance in the registry to use for xquery
(requires camel-saxon). This may be needed
-to add custom functions to a saxon configuration, so these custom functions
can be used in xquery expressions.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
- <xs:complexType name="deleteDefinition">
- <xs:complexContent>
- <xs:extension base="tns:verbDefinition">
- <xs:sequence/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="getDefinition">
- <xs:complexContent>
- <xs:extension base="tns:verbDefinition">
- <xs:sequence/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="headDefinition">
- <xs:complexContent>
- <xs:extension base="tns:verbDefinition">
- <xs:sequence/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="patchDefinition">
- <xs:complexContent>
- <xs:extension base="tns:verbDefinition">
- <xs:sequence/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="postDefinition">
- <xs:complexContent>
- <xs:extension base="tns:verbDefinition">
- <xs:sequence/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="putDefinition">
- <xs:complexContent>
- <xs:extension base="tns:verbDefinition">
- <xs:sequence/>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="restBindingDefinition">
- <xs:complexContent>
- <xs:extension base="tns:optionalIdentifiedDefinition">
- <xs:sequence/>
- <xs:attribute name="consumes" type="xs:string">
+ <xs:attribute name="groupDelimiter" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
<![CDATA[
-To define the content type what the REST service consumes (accept as input),
such as application/xml or
-application/json.
+Sets the delimiter to use when grouping. If this has not been set then token
will be used as the delimiter.
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="produces" type="xs:string">
+ <xs:attribute name="skipFirst" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
<![CDATA[
-To define the content type what the REST service produces (uses for output),
such as application/xml or
-application/json.
+To skip the very first element. Default value: false
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="bindingMode" type="xs:string">
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="xmlTokenizerExpression">
+ <xs:simpleContent>
+ <xs:extension base="tns:namespaceAwareExpression">
+ <xs:attribute name="mode" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
<![CDATA[
-Sets the binding mode to use. The default value is off. Default value: off
+The extraction mode. The available extraction modes are: i - injecting the
contextual namespace bindings into the
+extracted token (default) w - wrapping the extracted token in its ancestor
context u - unwrapping the extracted token to
+its child content t - extracting the text content of the specified element.
Default value: i
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="type" type="xs:string">
+ <xs:attribute name="group" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
<![CDATA[
-Sets the class name to use for binding from input to POJO for the incoming
data The name of the class of the input data.
-Append a to the end of the name if you want the input to be an array type.
+To group N parts together.
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="outType" type="xs:string">
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="xPathExpression">
+ <xs:simpleContent>
+ <xs:extension base="tns:namespaceAwareExpression">
+ <xs:attribute name="documentType" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
<![CDATA[
-Sets the class name to use for binding from POJO to output for the outgoing
data The name of the class of the input
-data. Append a to the end of the name if you want the input to be an array
type.
+Name of class for document type The default value is org.w3c.dom.Document.
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="skipBindingOnErrorCode" type="xs:string">
+ <xs:attribute name="resultType" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
<![CDATA[
-Whether to skip binding on output if there is a custom HTTP error code header.
This allows to build custom error
-messages that do not bind to json / xml etc, as success messages otherwise
will do. Default value: false
+Sets the class name of the result type (type from output) The default result
type is NodeSet. Default value: NODESET
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="clientRequestValidation" type="xs:string">
+ <xs:attribute name="saxon" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
<![CDATA[
-Whether to enable validation of the client request to check: 1) Content-Type
header matches what the Rest DSL consumes;
-returns HTTP Status 415 if validation error. 2) Accept header matches what the
Rest DSL produces; returns HTTP Status
-406 if validation error. 3) Missing required data (query parameters, HTTP
headers, body); returns HTTP Status 400 if
-validation error. 4) Parsing error of the message body (JSon, XML or Auto
binding mode must be enabled); returns HTTP
-Status 400 if validation error. Default value: false
+Whether to use Saxon. Default value: false
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="enableCORS" type="xs:string">
+ <xs:attribute name="factoryRef" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
<![CDATA[
-Whether to enable CORS headers in the HTTP response. The default value is
false. Default value: false
+References to a custom XPathFactory to lookup in the registry.
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="component" type="xs:string">
+ <xs:attribute name="objectModel" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
<![CDATA[
-Sets the component name that this definition will apply to.
+The XPath object model to use.
]]>
</xs:documentation>
</xs:annotation>
</xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
- <xs:complexType name="restConfigurationDefinition">
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="componentProperty"
type="tns:restPropertyDefinition">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Allows to configure as many additional properties for the rest component in
use.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="endpointProperty"
type="tns:restPropertyDefinition">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Allows to configure as many additional properties for the rest endpoint in use.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="consumerProperty"
type="tns:restPropertyDefinition">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Allows to configure as many additional properties for the rest consumer in use.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0"
name="dataFormatProperty" type="tns:restPropertyDefinition">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Allows to configure as many additional properties for the data formats in use.
For example set property prettyPrint to
-true to have json outputted in pretty mode. The properties can be prefixed to
denote the option is only for either JSON
-or XML and for either the IN or the OUT. The prefixes are: json.in. json.out.
xml.in. xml.out. For example a key with
-value xml.out.mustBeJAXBElement is only for the XML data format for the
outgoing. A key without a prefix is a common key
-for all situations.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="apiProperty"
type="tns:restPropertyDefinition">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Allows to configure as many additional properties for the api documentation.
For example set property api.title to my
-cool stuff.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="corsHeaders"
type="tns:restPropertyDefinition">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Allows to configure custom CORS headers.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:sequence>
- <xs:attribute name="component" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-The Camel Rest component to use for the REST transport (consumer), such as
netty-http, jetty, servlet, undertow. If no
-component has been explicit configured, then Camel will lookup if there is a
Camel component that integrates with the
-Rest DSL, or if a org.apache.camel.spi.RestConsumerFactory is registered in
the registry. If either one is found, then
-that is being used.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="apiComponent" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-The name of the Camel component to use as the REST API. If no API Component
has been explicit configured, then Camel
-will lookup if there is a Camel component responsible for servicing and
generating the REST API documentation, or if a
-org.apache.camel.spi.RestApiProcessorFactory is registered in the registry. If
either one is found, then that is being
-used.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="producerComponent" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Sets the name of the Camel component to use as the REST producer.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="scheme" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-The scheme to use for exposing the REST service. Usually http or https is
supported. The default value is http.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="host" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-The hostname to use for exposing the REST service.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="port" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ <xs:attribute name="logNamespaces" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
-The port number to use for exposing the REST service. Notice if you use
servlet component then the port number
-configured here does not apply, as the port number in use is the actual port
number the servlet component is using. eg
-if using Apache Tomcat its the tomcat http port, if using Apache Karaf its the
HTTP service in Karaf that uses port 8181
-by default etc. Though in those situations setting the port number here,
allows tooling and JMX to know the port number,
-so its recommended to set the port number to the number that the servlet
engine uses.
+Whether to log namespaces which can assist during troubleshooting. Default
value: false
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="apiHost" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="threadSafety" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
-To use a specific hostname for the API documentation (such as swagger or
openapi) This can be used to override the
-generated host with this configured hostname.
+Whether to enable thread-safety for the returned result of the xpath
expression. This applies to when using NODESET as
+the result type, and the returned set has multiple elements. In this situation
there can be thread-safety issues if you
+process the NODESET concurrently such as from a Camel Splitter EIP in parallel
processing mode. This option prevents
+concurrency issues by doing defensive copies of the nodes. It is recommended
to turn this option on if you are using
+camel-saxon or Saxon in your application. Saxon has thread-safety issues which
can be prevented by turning this option
+on. Default value: false
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="useXForwardHeaders" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="preCompile" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
-Whether to use X-Forward headers for Host and related setting. The default
value is true. Default value: true
+Whether to enable pre-compiling the xpath expression during initialization
phase. pre-compile is enabled by default.
+This can be used to turn off, for example in cases the compilation phase is
desired at the starting phase, such as if
+the application is ahead of time compiled (for example with camel-quarkus)
which would then load the xpath factory of
+the built operating system, and not a JVM runtime. Default value: true
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="producerApiDoc" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="xQueryExpression">
+ <xs:simpleContent>
+ <xs:extension base="tns:namespaceAwareExpression">
+ <xs:attribute name="resultType" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
-Sets the location of the api document the REST producer will use to validate
the REST uri and query parameters are valid
-accordingly to the api document. The location of the api document is loaded
from classpath by default, but you can use
-file: or http: to refer to resources to load from file or http url.
+Sets the class of the result type (type from output).
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="contextPath" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="type" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
-Sets a leading context-path the REST services will be using. This can be used
when using components such as
-camel-servlet where the deployed web application is deployed using a
context-path. Or for components such as camel-jetty
-or camel-netty-http that includes a HTTP server.
+Sets the class name of the result type (type from output) The default result
type is NodeSet.
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="apiContextPath" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="configurationRef" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
-Sets a leading API context-path the REST API services will be using. This can
be used when using components such as
-camel-servlet where the deployed web application is deployed using a
context-path.
+Reference to a saxon configuration instance in the registry to use for xquery
(requires camel-saxon). This may be needed
+to add custom functions to a saxon configuration, so these custom functions
can be used in xquery expressions.
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="apiContextRouteId" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="deleteDefinition">
+ <xs:complexContent>
+ <xs:extension base="tns:verbDefinition">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="getDefinition">
+ <xs:complexContent>
+ <xs:extension base="tns:verbDefinition">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="headDefinition">
+ <xs:complexContent>
+ <xs:extension base="tns:verbDefinition">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="patchDefinition">
+ <xs:complexContent>
+ <xs:extension base="tns:verbDefinition">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="postDefinition">
+ <xs:complexContent>
+ <xs:extension base="tns:verbDefinition">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="putDefinition">
+ <xs:complexContent>
+ <xs:extension base="tns:verbDefinition">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="restBindingDefinition">
+ <xs:complexContent>
+ <xs:extension base="tns:optionalIdentifiedDefinition">
+ <xs:sequence/>
+ <xs:attribute name="consumes" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
-Sets the route id to use for the route that services the REST API. The route
will by default use an auto assigned route
-id.
+To define the content type what the REST service consumes (accept as input),
such as application/xml or
+application/json.
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="apiVendorExtension" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="produces" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
-Whether vendor extension is enabled in the Rest APIs. If enabled then Camel
will include additional information as
-vendor extension (eg keys starting with x-) such as route ids, class names
etc. Not all 3rd party API gateways and tools
-supports vendor-extensions when importing your API docs. Default value: false
+To define the content type what the REST service produces (uses for output),
such as application/xml or
+application/json.
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="hostNameResolver" type="tns:restHostNameResolver">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="bindingMode" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
-If no hostname has been explicit configured, then this resolver is used to
compute the hostname the REST service will be
-using. Default value: allLocalIp
+Sets the binding mode to use. The default value is off. Default value: off
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="bindingMode" type="tns:restBindingMode">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="type" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
-Sets the binding mode to use. The default value is off. Default value: off
+Sets the class name to use for binding from input to POJO for the incoming
data The name of the class of the input data.
+Append a to the end of the name if you want the input to be an array type.
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="skipBindingOnErrorCode" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="outType" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Sets the class name to use for binding from POJO to output for the outgoing
data The name of the class of the input
+data. Append a to the end of the name if you want the input to be an array
type.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="skipBindingOnErrorCode" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
Whether to skip binding on output if there is a custom HTTP error code header.
This allows to build custom error
messages that do not bind to json / xml etc, as success messages otherwise
will do. Default value: false
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="clientRequestValidation" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="clientRequestValidation" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
Whether to enable validation of the client request to check: 1) Content-Type
header matches what the Rest DSL consumes;
returns HTTP Status 415 if validation error. 2) Accept header matches what the
Rest DSL produces; returns HTTP Status
@@ -16098,50 +16120,29 @@ returns HTTP Status 415 if validation error. 2)
Accept header matches what the R
validation error. 4) Parsing error of the message body (JSon, XML or Auto
binding mode must be enabled); returns HTTP
Status 400 if validation error. Default value: false
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="enableCORS" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="enableCORS" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
Whether to enable CORS headers in the HTTP response. The default value is
false. Default value: false
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="inlineRoutes" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Inline routes in rest-dsl which are linked using direct endpoints. By default,
each service in Rest DSL is an individual
-route, meaning that you would have at least two routes per service (rest-dsl,
and the route linked from rest-dsl).
-Enabling this allows Camel to optimize and inline this as a single route,
however this requires to use direct endpoints,
-which must be unique per service. This option is default false. Default value:
false
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="jsonDataFormat" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Name of specific json data format to use. By default jackson will be used.
Important: This option is only for setting a
-custom name of the data format, not to refer to an existing data format
instance.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="xmlDataFormat" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="component" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
<![CDATA[
-Name of specific XML data format to use. By default jaxb will be used.
Important: This option is only for setting a
-custom name of the data format, not to refer to an existing data format
instance.
+Sets the component name that this definition will apply to.
]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
</xs:complexType>
<xs:complexType name="restsDefinition">
<xs:complexContent>
@@ -17108,6 +17109,22 @@ An optional certificate alias to use. This is useful
when the keystore has multi
<xs:enumeration value="NEVER"/>
</xs:restriction>
</xs:simpleType>
+ <xs:simpleType name="restHostNameResolver">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="allLocalIp"/>
+ <xs:enumeration value="localIp"/>
+ <xs:enumeration value="localHostName"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="restBindingMode">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="auto"/>
+ <xs:enumeration value="off"/>
+ <xs:enumeration value="json"/>
+ <xs:enumeration value="xml"/>
+ <xs:enumeration value="json_xml"/>
+ </xs:restriction>
+ </xs:simpleType>
<xs:simpleType name="restParamType">
<xs:restriction base="xs:string">
<xs:enumeration value="body"/>
@@ -17139,22 +17156,6 @@ An optional certificate alias to use. This is useful
when the keystore has multi
<xs:enumeration value="regexp"/>
</xs:restriction>
</xs:simpleType>
- <xs:simpleType name="restBindingMode">
- <xs:restriction base="xs:string">
- <xs:enumeration value="auto"/>
- <xs:enumeration value="off"/>
- <xs:enumeration value="json"/>
- <xs:enumeration value="xml"/>
- <xs:enumeration value="json_xml"/>
- </xs:restriction>
- </xs:simpleType>
- <xs:simpleType name="restHostNameResolver">
- <xs:restriction base="xs:string">
- <xs:enumeration value="allLocalIp"/>
- <xs:enumeration value="localIp"/>
- <xs:enumeration value="localHostName"/>
- </xs:restriction>
- </xs:simpleType>
<xs:simpleType name="springErrorHandlerType">
<xs:restriction base="xs:string">
<xs:enumeration value="DefaultErrorHandler"/>
diff --git
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/app/beans.json
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/app/beans.json
index bd3ae76b593..83f307b302d 100644
---
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/app/beans.json
+++
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/app/beans.json
@@ -14,10 +14,11 @@
"properties": {
"component-scan": { "index": 0, "kind": "element", "displayName":
"Component-scan", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.app.ComponentScanDefinition>",
"deprecated": false, "autowired": false, "secret": false, "description":
"Component scanning definition(s). But unlike
package\/packageScan\/contextScan, we're not scanning only for
org.apache.camel.builder.RouteBuilder." },
"bean": { "index": 1, "kind": "element", "displayName": "Bean",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.app.RegistryBeanDefinition>",
"deprecated": false, "autowired": false, "secret": false },
- "rest": { "index": 2, "kind": "element", "displayName": "Rest",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.rest.RestDefinition>", "deprecated":
false, "autowired": false, "secret": false },
- "routeConfiguration": { "index": 3, "kind": "element", "displayName":
"Route Configuration", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteConfigurationDefinition>",
"deprecated": false, "autowired": false, "secret": false },
- "routeTemplate": { "index": 4, "kind": "element", "displayName": "Route
Template", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteTemplateDefinition>", "deprecated":
false, "autowired": false, "secret": false },
- "templatedRoute": { "index": 5, "kind": "element", "displayName":
"Templated Route", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.TemplatedRouteDefinition>",
"deprecated": false, "autowired": false, "secret": false },
- "route": { "index": 6, "kind": "element", "displayName": "Route",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteDefinition>", "deprecated": false,
"autowired": false, "secret": false }
+ "restConfiguration": { "index": 2, "kind": "element", "displayName": "Rest
Configuration", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.rest.RestConfigurationDefinition>",
"deprecated": false, "autowired": false, "secret": false },
+ "rest": { "index": 3, "kind": "element", "displayName": "Rest",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.rest.RestDefinition>", "deprecated":
false, "autowired": false, "secret": false },
+ "routeConfiguration": { "index": 4, "kind": "element", "displayName":
"Route Configuration", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteConfigurationDefinition>",
"deprecated": false, "autowired": false, "secret": false },
+ "routeTemplate": { "index": 5, "kind": "element", "displayName": "Route
Template", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteTemplateDefinition>", "deprecated":
false, "autowired": false, "secret": false },
+ "templatedRoute": { "index": 6, "kind": "element", "displayName":
"Templated Route", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.TemplatedRouteDefinition>",
"deprecated": false, "autowired": false, "secret": false },
+ "route": { "index": 7, "kind": "element", "displayName": "Route",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteDefinition>", "deprecated": false,
"autowired": false, "secret": false }
}
}
diff --git
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/app/camel.json
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/app/camel.json
index 9bba2b8258a..12af847b484 100644
---
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/app/camel.json
+++
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/app/camel.json
@@ -14,10 +14,11 @@
"properties": {
"component-scan": { "index": 0, "kind": "element", "displayName":
"Component-scan", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.app.ComponentScanDefinition>",
"deprecated": false, "autowired": false, "secret": false, "description":
"Component scanning definition(s). But unlike
package\/packageScan\/contextScan, we're not scanning only for
org.apache.camel.builder.RouteBuilder." },
"bean": { "index": 1, "kind": "element", "displayName": "Bean",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.app.RegistryBeanDefinition>",
"deprecated": false, "autowired": false, "secret": false },
- "rest": { "index": 2, "kind": "element", "displayName": "Rest",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.rest.RestDefinition>", "deprecated":
false, "autowired": false, "secret": false },
- "routeConfiguration": { "index": 3, "kind": "element", "displayName":
"Route Configuration", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteConfigurationDefinition>",
"deprecated": false, "autowired": false, "secret": false },
- "routeTemplate": { "index": 4, "kind": "element", "displayName": "Route
Template", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteTemplateDefinition>", "deprecated":
false, "autowired": false, "secret": false },
- "templatedRoute": { "index": 5, "kind": "element", "displayName":
"Templated Route", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.TemplatedRouteDefinition>",
"deprecated": false, "autowired": false, "secret": false },
- "route": { "index": 6, "kind": "element", "displayName": "Route",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteDefinition>", "deprecated": false,
"autowired": false, "secret": false }
+ "restConfiguration": { "index": 2, "kind": "element", "displayName": "Rest
Configuration", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.rest.RestConfigurationDefinition>",
"deprecated": false, "autowired": false, "secret": false },
+ "rest": { "index": 3, "kind": "element", "displayName": "Rest",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.rest.RestDefinition>", "deprecated":
false, "autowired": false, "secret": false },
+ "routeConfiguration": { "index": 4, "kind": "element", "displayName":
"Route Configuration", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteConfigurationDefinition>",
"deprecated": false, "autowired": false, "secret": false },
+ "routeTemplate": { "index": 5, "kind": "element", "displayName": "Route
Template", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteTemplateDefinition>", "deprecated":
false, "autowired": false, "secret": false },
+ "templatedRoute": { "index": 6, "kind": "element", "displayName":
"Templated Route", "required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.TemplatedRouteDefinition>",
"deprecated": false, "autowired": false, "secret": false },
+ "route": { "index": 7, "kind": "element", "displayName": "Route",
"required": false, "type": "array", "javaType":
"java.util.List<org.apache.camel.model.RouteDefinition>", "deprecated": false,
"autowired": false, "secret": false }
}
}
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/app/BeansDefinition.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/app/BeansDefinition.java
index d44e3e459dd..9296237281a 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/model/app/BeansDefinition.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/app/BeansDefinition.java
@@ -32,6 +32,7 @@ import org.apache.camel.model.RouteConfigurationDefinition;
import org.apache.camel.model.RouteDefinition;
import org.apache.camel.model.RouteTemplateDefinition;
import org.apache.camel.model.TemplatedRouteDefinition;
+import org.apache.camel.model.rest.RestConfigurationDefinition;
import org.apache.camel.model.rest.RestDefinition;
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.annotations.ExternalSchemaElement;
@@ -51,6 +52,7 @@ import org.apache.camel.spi.annotations.ExternalSchemaElement;
"componentScanning",
"beans",
"springBeans",
+ "restConfigurations",
"rests",
"routeConfigurations",
"routeTemplates",
@@ -88,6 +90,8 @@ public class BeansDefinition {
// initially we'll be supporting only these elements which are parsed by
// org.apache.camel.dsl.xml.io.XmlRoutesBuilderLoader in camel-xml-io-dsl
+ @XmlElement(name = "restConfiguration")
+ private List<RestConfigurationDefinition> restConfigurations = new
ArrayList<>();
@XmlElement(name = "rest")
private List<RestDefinition> rests = new ArrayList<>();
@XmlElement(name = "routeConfiguration")
@@ -123,6 +127,14 @@ public class BeansDefinition {
this.springBeans = springBeans;
}
+ public List<RestConfigurationDefinition> getRestConfigurations() {
+ return restConfigurations;
+ }
+
+ public void setRestConfigurations(List<RestConfigurationDefinition>
restConfigs) {
+ this.restConfigurations = restConfigs;
+ }
+
public List<RestDefinition> getRests() {
return rests;
}
diff --git
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
index 7491773fbd8..3acd8f38740 100644
---
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
+++
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
@@ -1593,6 +1593,7 @@ public class ModelParser extends BaseParser {
switch (key) {
case "bean": doAdd(doParseRegistryBeanDefinition(),
def.getBeans(), def::setBeans); break;
case "component-scan": doAdd(doParseComponentScanDefinition(),
def.getComponentScanning(), def::setComponentScanning); break;
+ case "restConfiguration":
doAdd(doParseRestConfigurationDefinition(), def.getRestConfigurations(),
def::setRestConfigurations); break;
case "rest": doAdd(doParseRestDefinition(), def.getRests(),
def::setRests); break;
case "routeConfiguration":
doAdd(doParseRouteConfigurationDefinition(), def.getRouteConfigurations(),
def::setRouteConfigurations); break;
case "routeTemplate": doAdd(doParseRouteTemplateDefinition(),
def.getRouteTemplates(), def::setRouteTemplates); break;
@@ -1632,6 +1633,46 @@ public class ModelParser extends BaseParser {
return false;
}, noValueHandler());
}
+ protected RestConfigurationDefinition doParseRestConfigurationDefinition()
throws IOException, XmlPullParserException {
+ return doParse(new RestConfigurationDefinition(), (def, key, val) -> {
+ switch (key) {
+ case "apiComponent": def.setApiComponent(val); break;
+ case "apiContextPath": def.setApiContextPath(val); break;
+ case "apiContextRouteId": def.setApiContextRouteId(val); break;
+ case "apiHost": def.setApiHost(val); break;
+ case "apiVendorExtension": def.setApiVendorExtension(val);
break;
+ case "bindingMode":
def.setBindingMode(RestBindingMode.valueOf(val)); break;
+ case "clientRequestValidation":
def.setClientRequestValidation(val); break;
+ case "component": def.setComponent(val); break;
+ case "contextPath": def.setContextPath(val); break;
+ case "enableCORS": def.setEnableCORS(val); break;
+ case "host": def.setHost(val); break;
+ case "hostNameResolver":
def.setHostNameResolver(RestHostNameResolver.valueOf(val)); break;
+ case "inlineRoutes": def.setInlineRoutes(val); break;
+ case "jsonDataFormat": def.setJsonDataFormat(val); break;
+ case "port": def.setPort(val); break;
+ case "producerApiDoc": def.setProducerApiDoc(val); break;
+ case "producerComponent": def.setProducerComponent(val); break;
+ case "scheme": def.setScheme(val); break;
+ case "skipBindingOnErrorCode":
def.setSkipBindingOnErrorCode(val); break;
+ case "useXForwardHeaders": def.setUseXForwardHeaders(val);
break;
+ case "xmlDataFormat": def.setXmlDataFormat(val); break;
+ default: return false;
+ }
+ return true;
+ }, (def, key) -> {
+ switch (key) {
+ case "apiProperty": doAdd(doParseRestPropertyDefinition(),
def.getApiProperties(), def::setApiProperties); break;
+ case "componentProperty":
doAdd(doParseRestPropertyDefinition(), def.getComponentProperties(),
def::setComponentProperties); break;
+ case "consumerProperty":
doAdd(doParseRestPropertyDefinition(), def.getConsumerProperties(),
def::setConsumerProperties); break;
+ case "corsHeaders": doAdd(doParseRestPropertyDefinition(),
def.getCorsHeaders(), def::setCorsHeaders); break;
+ case "dataFormatProperty":
doAdd(doParseRestPropertyDefinition(), def.getDataFormatProperties(),
def::setDataFormatProperties); break;
+ case "endpointProperty":
doAdd(doParseRestPropertyDefinition(), def.getEndpointProperties(),
def::setEndpointProperties); break;
+ default: return false;
+ }
+ return true;
+ }, noValueHandler());
+ }
protected BeanPropertyDefinition doParseBeanPropertyDefinition() throws
IOException, XmlPullParserException {
return doParse(new BeanPropertyDefinition(), (def, key, val) -> {
switch (key) {
@@ -3139,46 +3180,6 @@ public class ModelParser extends BaseParser {
return false;
}, noValueHandler());
}
- protected RestConfigurationDefinition doParseRestConfigurationDefinition()
throws IOException, XmlPullParserException {
- return doParse(new RestConfigurationDefinition(), (def, key, val) -> {
- switch (key) {
- case "apiComponent": def.setApiComponent(val); break;
- case "apiContextPath": def.setApiContextPath(val); break;
- case "apiContextRouteId": def.setApiContextRouteId(val); break;
- case "apiHost": def.setApiHost(val); break;
- case "apiVendorExtension": def.setApiVendorExtension(val);
break;
- case "bindingMode":
def.setBindingMode(RestBindingMode.valueOf(val)); break;
- case "clientRequestValidation":
def.setClientRequestValidation(val); break;
- case "component": def.setComponent(val); break;
- case "contextPath": def.setContextPath(val); break;
- case "enableCORS": def.setEnableCORS(val); break;
- case "host": def.setHost(val); break;
- case "hostNameResolver":
def.setHostNameResolver(RestHostNameResolver.valueOf(val)); break;
- case "inlineRoutes": def.setInlineRoutes(val); break;
- case "jsonDataFormat": def.setJsonDataFormat(val); break;
- case "port": def.setPort(val); break;
- case "producerApiDoc": def.setProducerApiDoc(val); break;
- case "producerComponent": def.setProducerComponent(val); break;
- case "scheme": def.setScheme(val); break;
- case "skipBindingOnErrorCode":
def.setSkipBindingOnErrorCode(val); break;
- case "useXForwardHeaders": def.setUseXForwardHeaders(val);
break;
- case "xmlDataFormat": def.setXmlDataFormat(val); break;
- default: return false;
- }
- return true;
- }, (def, key) -> {
- switch (key) {
- case "apiProperty": doAdd(doParseRestPropertyDefinition(),
def.getApiProperties(), def::setApiProperties); break;
- case "componentProperty":
doAdd(doParseRestPropertyDefinition(), def.getComponentProperties(),
def::setComponentProperties); break;
- case "consumerProperty":
doAdd(doParseRestPropertyDefinition(), def.getConsumerProperties(),
def::setConsumerProperties); break;
- case "corsHeaders": doAdd(doParseRestPropertyDefinition(),
def.getCorsHeaders(), def::setCorsHeaders); break;
- case "dataFormatProperty":
doAdd(doParseRestPropertyDefinition(), def.getDataFormatProperties(),
def::setDataFormatProperties); break;
- case "endpointProperty":
doAdd(doParseRestPropertyDefinition(), def.getEndpointProperties(),
def::setEndpointProperties); break;
- default: return false;
- }
- return true;
- }, noValueHandler());
- }
protected RestSecuritiesDefinition doParseRestSecuritiesDefinition()
throws IOException, XmlPullParserException {
return doParse(new RestSecuritiesDefinition(),
noAttributeHandler(), (def, key) -> {
diff --git
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
index c068fb2d0fa..a54d8d00148 100644
---
a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
+++
b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
@@ -2516,6 +2516,7 @@ public class ModelWriter extends BaseWriter {
throws IOException {
doWriteList(null, "route", def.getRoutes(),
this::doWriteRouteDefinition);
domElements(def.getSpringBeans());
+ doWriteList(null, "restConfiguration", def.getRestConfigurations(),
this::doWriteRestConfigurationDefinition);
doWriteList(null, "component-scan", def.getComponentScanning(),
this::doWriteComponentScanDefinition);
doWriteList(null, "bean", def.getBeans(),
this::doWriteRegistryBeanDefinition);
doWriteList(null, "rest", def.getRests(), this::doWriteRestDefinition);
diff --git
a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
index 1de667e6cec..feaca8f21d9 100644
---
a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
+++
b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
@@ -2516,6 +2516,7 @@ public class ModelWriter extends BaseWriter {
throws IOException {
doWriteList(null, "route", def.getRoutes(),
this::doWriteRouteDefinition);
domElements(def.getSpringBeans());
+ doWriteList(null, "restConfiguration", def.getRestConfigurations(),
this::doWriteRestConfigurationDefinition);
doWriteList(null, "component-scan", def.getComponentScanning(),
this::doWriteComponentScanDefinition);
doWriteList(null, "bean", def.getBeans(),
this::doWriteRegistryBeanDefinition);
doWriteList(null, "rest", def.getRests(), this::doWriteRestDefinition);
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
index 0d1b82fa624..91b18829099 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
@@ -596,6 +596,7 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
@YamlProperty(name = "bean", type =
"array:org.apache.camel.model.app.RegistryBeanDefinition"),
@YamlProperty(name = "component-scan", type =
"array:org.apache.camel.model.app.ComponentScanDefinition"),
@YamlProperty(name = "rest", type =
"array:org.apache.camel.model.rest.RestDefinition"),
+ @YamlProperty(name = "rest-configuration", type =
"array:org.apache.camel.model.rest.RestConfigurationDefinition"),
@YamlProperty(name = "route", type =
"array:org.apache.camel.model.RouteDefinition"),
@YamlProperty(name = "route-configuration", type =
"array:org.apache.camel.model.RouteConfigurationDefinition"),
@YamlProperty(name = "route-template", type =
"array:org.apache.camel.model.RouteTemplateDefinition"),
@@ -626,6 +627,11 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
target.setComponentScanning(val);
break;
}
+ case "rest-configuration": {
+
java.util.List<org.apache.camel.model.rest.RestConfigurationDefinition> val =
asFlatList(node, org.apache.camel.model.rest.RestConfigurationDefinition.class);
+ target.setRestConfigurations(val);
+ break;
+ }
case "rest": {
java.util.List<org.apache.camel.model.rest.RestDefinition>
val = asFlatList(node, org.apache.camel.model.rest.RestDefinition.class);
target.setRests(val);
@@ -1203,6 +1209,7 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
@YamlProperty(name = "bean", type =
"array:org.apache.camel.model.app.RegistryBeanDefinition"),
@YamlProperty(name = "component-scan", type =
"array:org.apache.camel.model.app.ComponentScanDefinition"),
@YamlProperty(name = "rest", type =
"array:org.apache.camel.model.rest.RestDefinition"),
+ @YamlProperty(name = "rest-configuration", type =
"array:org.apache.camel.model.rest.RestConfigurationDefinition"),
@YamlProperty(name = "route", type =
"array:org.apache.camel.model.RouteDefinition"),
@YamlProperty(name = "route-configuration", type =
"array:org.apache.camel.model.RouteConfigurationDefinition"),
@YamlProperty(name = "route-template", type =
"array:org.apache.camel.model.RouteTemplateDefinition"),
@@ -1233,6 +1240,11 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
target.setComponentScanning(val);
break;
}
+ case "rest-configuration": {
+
java.util.List<org.apache.camel.model.rest.RestConfigurationDefinition> val =
asFlatList(node, org.apache.camel.model.rest.RestConfigurationDefinition.class);
+ target.setRestConfigurations(val);
+ break;
+ }
case "rest": {
java.util.List<org.apache.camel.model.rest.RestDefinition>
val = asFlatList(node, org.apache.camel.model.rest.RestDefinition.class);
target.setRests(val);
@@ -12620,6 +12632,7 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
}
}
+ @YamlIn
@YamlType(
nodes = {
"rest-configuration",
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlDeserializersMojo.java
b/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlDeserializersMojo.java
index 4aeaea358b4..09413bf4445 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlDeserializersMojo.java
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlDeserializersMojo.java
@@ -379,6 +379,9 @@ public class GenerateYamlDeserializersMojo extends
GenerateYamlSupportMojo {
if
(info.name().toString().equals("org.apache.camel.model.rest.RestDefinition")) {
builder.addAnnotation(CN_YAML_IN);
}
+ if
(info.name().toString().equals("org.apache.camel.model.rest.RestConfigurationDefinition"))
{
+ builder.addAnnotation(CN_YAML_IN);
+ }
final AtomicReference<String> modelName = new AtomicReference<>();
annotationValue(info, XML_ROOT_ELEMENT_ANNOTATION_CLASS, "name")
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
index 29d73d24ff4..76e1cb9eef9 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
@@ -3681,6 +3681,12 @@
"$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestDefinition"
}
},
+ "rest-configuration" : {
+ "type" : "array",
+ "items" : {
+ "$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestConfigurationDefinition"
+ }
+ },
"route" : {
"type" : "array",
"items" : {
@@ -3753,6 +3759,12 @@
"$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestDefinition"
}
},
+ "rest-configuration" : {
+ "type" : "array",
+ "items" : {
+ "$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestConfigurationDefinition"
+ }
+ },
"route" : {
"type" : "array",
"items" : {
@@ -8269,6 +8281,12 @@
"templatedRoute" : {
"$ref" :
"#/items/definitions/org.apache.camel.model.TemplatedRouteDefinition"
},
+ "rest-configuration" : {
+ "$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestConfigurationDefinition"
+ },
+ "restConfiguration" : {
+ "$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestConfigurationDefinition"
+ },
"rest" : {
"$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestDefinition"
}
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
index 1c4725fae54..06c320f6d52 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
@@ -3591,6 +3591,12 @@
"$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestDefinition"
}
},
+ "restConfiguration" : {
+ "type" : "array",
+ "items" : {
+ "$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestConfigurationDefinition"
+ }
+ },
"route" : {
"type" : "array",
"items" : {
@@ -3663,6 +3669,12 @@
"$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestDefinition"
}
},
+ "restConfiguration" : {
+ "type" : "array",
+ "items" : {
+ "$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestConfigurationDefinition"
+ }
+ },
"route" : {
"type" : "array",
"items" : {
@@ -8161,6 +8173,9 @@
"templatedRoute" : {
"$ref" :
"#/items/definitions/org.apache.camel.model.TemplatedRouteDefinition"
},
+ "restConfiguration" : {
+ "$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestConfigurationDefinition"
+ },
"rest" : {
"$ref" :
"#/items/definitions/org.apache.camel.model.rest.RestDefinition"
}