This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch rest-to in repository https://gitbox.apache.org/repos/asf/camel.git
commit f85c5cdc4d4705f871aa1f041c73fbc31fa79f5c Author: Claus Ibsen <[email protected]> AuthorDate: Tue Feb 22 12:37:35 2022 +0100 CAMEL-17675: camel-core - Rest DSL remove support for using inlined routes. --- .../org/apache/camel/catalog/models/delete.json | 2 +- .../org/apache/camel/catalog/models/get.json | 2 +- .../org/apache/camel/catalog/models/head.json | 2 +- .../org/apache/camel/catalog/models/patch.json | 2 +- .../org/apache/camel/catalog/models/post.json | 2 +- .../org/apache/camel/catalog/models/put.json | 2 +- .../apache/camel/catalog/schemas/camel-spring.xsd | 6 +- .../helper/CamelJavaRestDslParserHelper.java | 14 ++- .../parser/helper/CamelXmlRestDslParserHelper.java | 9 +- .../apache/camel/parser/model/RestVerbDetails.java | 17 +-- .../camel/parser/java/MyRestDslRouteBuilder.java | 2 +- .../camel/parser/java/RoasterJavaRestDslTest.java | 6 +- .../apache/camel/parser/xml/XmlRestDslTest.java | 6 +- .../org/apache/camel/parser/xml/myrest.xml | 4 +- .../java/org/apache/camel/coap/CoAPCORSTest.java | 3 +- .../apache/camel/coap/CoAPRestContextPathTest.java | 3 +- .../org/apache/camel/coap/CoAPRestVerbTest.java | 15 ++- .../apache/camel/service/lra/LRASagaRoutes.java | 9 +- .../org/apache/camel/openapi/ComplexTypesTest.java | 17 +-- .../camel/openapi/RestOpenApiLicenseInfoTest.java | 6 +- .../camel/openapi/RestOpenApiProcessorTest.java | 24 ++--- .../http/vertx/VertxPlatformHttpEngineTest.java | 6 +- ...stPlatformHttpContextPathConfigurationTest.java | 17 ++- .../dsl/yaml/deserializers/ModelDeserializers.java | 114 ++------------------- 24 files changed, 86 insertions(+), 204 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/delete.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/delete.json index bafa802..17f46bb 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/delete.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/delete.json @@ -23,7 +23,7 @@ "deprecated": { "kind": "attribute", "displayName": "Deprecated", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Marks this rest operation as deprecated in OpenApi documentation." }, "type": { "kind": "attribute", "displayName": "Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level. 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." }, "outType": { "kind": "attribute", "displayName": "Out Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level 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." }, - "toOrRoute": { "kind": "element", "displayName": "To Or Route", "required": true, "type": "object", "javaType": "org.apache.camel.model.OptionalIdentifiedDefinition<java.lang.Object>", "oneOf": [ "route", "to", "toD" ], "deprecated": false, "autowired": false, "secret": false, "description": "To route from this REST service to a Camel endpoint, or an inlined route" }, + "to": { "kind": "element", "displayName": "To", "required": true, "type": "object", "javaType": "org.apache.camel.model.ToDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "The Camel endpoint this REST service will call, such as a direct endpoint to link to an existing route that handles this REST call." }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, "description": { "kind": "element", "displayName": "Description", "required": false, "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/get.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/get.json index c7c3199..e9b79ff 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/get.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/get.json @@ -23,7 +23,7 @@ "deprecated": { "kind": "attribute", "displayName": "Deprecated", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Marks this rest operation as deprecated in OpenApi documentation." }, "type": { "kind": "attribute", "displayName": "Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level. 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." }, "outType": { "kind": "attribute", "displayName": "Out Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level 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." }, - "toOrRoute": { "kind": "element", "displayName": "To Or Route", "required": true, "type": "object", "javaType": "org.apache.camel.model.OptionalIdentifiedDefinition<java.lang.Object>", "oneOf": [ "route", "to", "toD" ], "deprecated": false, "autowired": false, "secret": false, "description": "To route from this REST service to a Camel endpoint, or an inlined route" }, + "to": { "kind": "element", "displayName": "To", "required": true, "type": "object", "javaType": "org.apache.camel.model.ToDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "The Camel endpoint this REST service will call, such as a direct endpoint to link to an existing route that handles this REST call." }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, "description": { "kind": "element", "displayName": "Description", "required": false, "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/head.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/head.json index f90765c..e8653ad 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/head.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/head.json @@ -23,7 +23,7 @@ "deprecated": { "kind": "attribute", "displayName": "Deprecated", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Marks this rest operation as deprecated in OpenApi documentation." }, "type": { "kind": "attribute", "displayName": "Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level. 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." }, "outType": { "kind": "attribute", "displayName": "Out Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level 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." }, - "toOrRoute": { "kind": "element", "displayName": "To Or Route", "required": true, "type": "object", "javaType": "org.apache.camel.model.OptionalIdentifiedDefinition<java.lang.Object>", "oneOf": [ "route", "to", "toD" ], "deprecated": false, "autowired": false, "secret": false, "description": "To route from this REST service to a Camel endpoint, or an inlined route" }, + "to": { "kind": "element", "displayName": "To", "required": true, "type": "object", "javaType": "org.apache.camel.model.ToDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "The Camel endpoint this REST service will call, such as a direct endpoint to link to an existing route that handles this REST call." }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, "description": { "kind": "element", "displayName": "Description", "required": false, "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/patch.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/patch.json index 0f5d175..b78fea7 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/patch.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/patch.json @@ -23,7 +23,7 @@ "deprecated": { "kind": "attribute", "displayName": "Deprecated", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Marks this rest operation as deprecated in OpenApi documentation." }, "type": { "kind": "attribute", "displayName": "Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level. 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." }, "outType": { "kind": "attribute", "displayName": "Out Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level 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." }, - "toOrRoute": { "kind": "element", "displayName": "To Or Route", "required": true, "type": "object", "javaType": "org.apache.camel.model.OptionalIdentifiedDefinition<java.lang.Object>", "oneOf": [ "route", "to", "toD" ], "deprecated": false, "autowired": false, "secret": false, "description": "To route from this REST service to a Camel endpoint, or an inlined route" }, + "to": { "kind": "element", "displayName": "To", "required": true, "type": "object", "javaType": "org.apache.camel.model.ToDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "The Camel endpoint this REST service will call, such as a direct endpoint to link to an existing route that handles this REST call." }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, "description": { "kind": "element", "displayName": "Description", "required": false, "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/post.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/post.json index 666c6b6..4079a15 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/post.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/post.json @@ -23,7 +23,7 @@ "deprecated": { "kind": "attribute", "displayName": "Deprecated", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Marks this rest operation as deprecated in OpenApi documentation." }, "type": { "kind": "attribute", "displayName": "Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level. 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." }, "outType": { "kind": "attribute", "displayName": "Out Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level 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." }, - "toOrRoute": { "kind": "element", "displayName": "To Or Route", "required": true, "type": "object", "javaType": "org.apache.camel.model.OptionalIdentifiedDefinition<java.lang.Object>", "oneOf": [ "route", "to", "toD" ], "deprecated": false, "autowired": false, "secret": false, "description": "To route from this REST service to a Camel endpoint, or an inlined route" }, + "to": { "kind": "element", "displayName": "To", "required": true, "type": "object", "javaType": "org.apache.camel.model.ToDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "The Camel endpoint this REST service will call, such as a direct endpoint to link to an existing route that handles this REST call." }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, "description": { "kind": "element", "displayName": "Description", "required": false, "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/put.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/put.json index 8bf87a2..e2831e7 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/put.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/put.json @@ -23,7 +23,7 @@ "deprecated": { "kind": "attribute", "displayName": "Deprecated", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Marks this rest operation as deprecated in OpenApi documentation." }, "type": { "kind": "attribute", "displayName": "Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from input to POJO for the incoming data This option will override what may be configured on a parent level. 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." }, "outType": { "kind": "attribute", "displayName": "Out Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name to use for binding from POJO to output for the outgoing data This option will override what may be configured on a parent level 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." }, - "toOrRoute": { "kind": "element", "displayName": "To Or Route", "required": true, "type": "object", "javaType": "org.apache.camel.model.OptionalIdentifiedDefinition<java.lang.Object>", "oneOf": [ "route", "to", "toD" ], "deprecated": false, "autowired": false, "secret": false, "description": "To route from this REST service to a Camel endpoint, or an inlined route" }, + "to": { "kind": "element", "displayName": "To", "required": true, "type": "object", "javaType": "org.apache.camel.model.ToDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "The Camel endpoint this REST service will call, such as a direct endpoint to link to an existing route that handles this REST call." }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, "description": { "kind": "element", "displayName": "Description", "required": false, "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" } } 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 d214909..fbe3ff0 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 @@ -13844,11 +13844,7 @@ configuration, so these custom functions can be used in xquery expressions. <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:param"/> <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:responseMessage"/> <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:security"/> - <xs:choice> - <xs:element ref="tns:to"/> - <xs:element ref="tns:toD"/> - <xs:element ref="tns:route"/> - </xs:choice> + <xs:element ref="tns:to"/> </xs:sequence> <xs:attribute name="path" type="xs:string"> <xs:annotation> diff --git a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java index 6d8c8d2..bc04be9 100644 --- a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java +++ b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelJavaRestDslParserHelper.java @@ -380,8 +380,6 @@ public final class CamelJavaRestDslParserHelper { verb.setApiDocs(extractValueFromFirstArgument(clazz, block, mi)); } else if ("to".equals(name)) { verb.setTo(extractValueFromFirstArgument(clazz, block, mi)); - } else if ("toD".equals(name)) { - verb.setToD(extractValueFromFirstArgument(clazz, block, mi)); } else if ("tag".equals(name)) { // tag is only available on the node node.setTag(extractValueFromFirstArgument(clazz, block, mi)); @@ -390,32 +388,32 @@ public final class CamelJavaRestDslParserHelper { if ("delete".equals(name)) { node.addVerb(verb); verb.setMethod("delete"); - verb.setUri(extractValueFromFirstArgument(clazz, block, mi)); + verb.setPath(extractValueFromFirstArgument(clazz, block, mi)); verb = null; // reset as this verb is not complete } else if ("get".equals(name)) { node.addVerb(verb); verb.setMethod("get"); - verb.setUri(extractValueFromFirstArgument(clazz, block, mi)); + verb.setPath(extractValueFromFirstArgument(clazz, block, mi)); verb = null; // reset as this verb is not complete } else if ("head".equals(name)) { node.addVerb(verb); verb.setMethod("head"); - verb.setUri(extractValueFromFirstArgument(clazz, block, mi)); + verb.setPath(extractValueFromFirstArgument(clazz, block, mi)); verb = null; // reset as this verb is not complete } else if ("patch".equals(name)) { node.addVerb(verb); verb.setMethod("patch"); - verb.setUri(extractValueFromFirstArgument(clazz, block, mi)); + verb.setPath(extractValueFromFirstArgument(clazz, block, mi)); verb = null; // reset as this verb is not complete } else if ("post".equals(name)) { node.addVerb(verb); verb.setMethod("post"); - verb.setUri(extractValueFromFirstArgument(clazz, block, mi)); + verb.setPath(extractValueFromFirstArgument(clazz, block, mi)); verb = null; // reset as this verb is not complete } else if ("put".equals(name)) { node.addVerb(verb); verb.setMethod("put"); - verb.setUri(extractValueFromFirstArgument(clazz, block, mi)); + verb.setPath(extractValueFromFirstArgument(clazz, block, mi)); verb = null; // reset as this verb is not complete } diff --git a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelXmlRestDslParserHelper.java b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelXmlRestDslParserHelper.java index e4fee74..d3f9e1b 100644 --- a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelXmlRestDslParserHelper.java +++ b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/helper/CamelXmlRestDslParserHelper.java @@ -201,13 +201,6 @@ public final class CamelXmlRestDslParserHelper { if (verb != null) { verb.setTo(uri); } - } else if ("toD".equals(xmlNode.getNodeName())) { - NamedNodeMap map = xmlNode.getAttributes(); - String uri = extractAttribute(map, "uri"); - RestVerbDetails verb = getLastVerb(detail); - if (verb != null) { - verb.setToD(uri); - } } } @@ -236,7 +229,7 @@ public final class CamelXmlRestDslParserHelper { private static void extractAttributes(Node xmlNode, RestVerbDetails detail) { NamedNodeMap map = xmlNode.getAttributes(); - detail.setUri(extractAttribute(map, "uri")); + detail.setPath(extractAttribute(map, "path")); detail.setConsumes(extractAttribute(map, "consumes")); detail.setProduces(extractAttribute(map, "produces")); detail.setApiDocs(extractAttribute(map, "apiDocs")); diff --git a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/model/RestVerbDetails.java b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/model/RestVerbDetails.java index 02342d7..56c2a7a 100644 --- a/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/model/RestVerbDetails.java +++ b/catalog/camel-route-parser/src/main/java/org/apache/camel/parser/model/RestVerbDetails.java @@ -31,6 +31,7 @@ public class RestVerbDetails { // camel verb details private String method; private String uri; + private String path; private String consumes; private String produces; private String bindingMode; @@ -41,7 +42,6 @@ public class RestVerbDetails { private String description; private String apiDocs; private String to; - private String toD; public String getFileName() { return fileName; @@ -99,12 +99,12 @@ public class RestVerbDetails { this.method = method; } - public String getUri() { - return uri; + public String getPath() { + return path; } - public void setUri(String uri) { - this.uri = uri; + public void setPath(String path) { + this.path = path; } public String getConsumes() { @@ -187,11 +187,4 @@ public class RestVerbDetails { this.to = to; } - public String getToD() { - return toD; - } - - public void setToD(String toD) { - this.toD = toD; - } } diff --git a/catalog/camel-route-parser/src/test/java/org/apache/camel/parser/java/MyRestDslRouteBuilder.java b/catalog/camel-route-parser/src/test/java/org/apache/camel/parser/java/MyRestDslRouteBuilder.java index af65a2b..b73dc09 100644 --- a/catalog/camel-route-parser/src/test/java/org/apache/camel/parser/java/MyRestDslRouteBuilder.java +++ b/catalog/camel-route-parser/src/test/java/org/apache/camel/parser/java/MyRestDslRouteBuilder.java @@ -46,6 +46,6 @@ public class MyRestDslRouteBuilder extends RouteBuilder { .to("log:id") .post().bindingMode(RestBindingMode.xml) .description("post something") - .toD("log:post"); + .to("log:post"); } } diff --git a/catalog/camel-route-parser/src/test/java/org/apache/camel/parser/java/RoasterJavaRestDslTest.java b/catalog/camel-route-parser/src/test/java/org/apache/camel/parser/java/RoasterJavaRestDslTest.java index 7d3c2e6..55b98b3 100644 --- a/catalog/camel-route-parser/src/test/java/org/apache/camel/parser/java/RoasterJavaRestDslTest.java +++ b/catalog/camel-route-parser/src/test/java/org/apache/camel/parser/java/RoasterJavaRestDslTest.java @@ -94,15 +94,15 @@ public class RoasterJavaRestDslTest extends CamelTestSupport { assertEquals("json", details.getProduces()); assertEquals(2, details.getVerbs().size()); assertEquals("get", details.getVerbs().get(0).getMethod()); - assertEquals("{id}", details.getVerbs().get(0).getUri()); + assertEquals("{id}", details.getVerbs().get(0).getPath()); assertEquals("get by id", details.getVerbs().get(0).getDescription()); assertEquals("log:id", details.getVerbs().get(0).getTo()); assertEquals("false", details.getVerbs().get(0).getApiDocs()); assertEquals("post", details.getVerbs().get(1).getMethod()); assertEquals("post something", details.getVerbs().get(1).getDescription()); assertEquals("xml", details.getVerbs().get(1).getBindingMode()); - assertEquals("log:post", details.getVerbs().get(1).getToD()); - assertNull(details.getVerbs().get(1).getUri()); + assertEquals("log:post", details.getVerbs().get(1).getTo()); + assertNull(details.getVerbs().get(1).getPath()); } } diff --git a/catalog/camel-route-parser/src/test/java/org/apache/camel/parser/xml/XmlRestDslTest.java b/catalog/camel-route-parser/src/test/java/org/apache/camel/parser/xml/XmlRestDslTest.java index 8fe5f43..a8318ea 100644 --- a/catalog/camel-route-parser/src/test/java/org/apache/camel/parser/xml/XmlRestDslTest.java +++ b/catalog/camel-route-parser/src/test/java/org/apache/camel/parser/xml/XmlRestDslTest.java @@ -92,15 +92,15 @@ public class XmlRestDslTest { assertEquals("json", details.getProduces()); assertEquals(2, details.getVerbs().size()); assertEquals("get", details.getVerbs().get(0).getMethod()); - assertEquals("{id}", details.getVerbs().get(0).getUri()); + assertEquals("{id}", details.getVerbs().get(0).getPath()); assertEquals("get by id", details.getVerbs().get(0).getDescription()); assertEquals("log:id", details.getVerbs().get(0).getTo()); assertEquals("false", details.getVerbs().get(0).getApiDocs()); assertEquals("post", details.getVerbs().get(1).getMethod()); assertEquals("post something", details.getVerbs().get(1).getDescription()); assertEquals("xml", details.getVerbs().get(1).getBindingMode()); - assertEquals("log:post", details.getVerbs().get(1).getToD()); - assertNull(details.getVerbs().get(1).getUri()); + assertEquals("log:post", details.getVerbs().get(1).getTo()); + assertNull(details.getVerbs().get(1).getPath()); } } diff --git a/catalog/camel-route-parser/src/test/resources/org/apache/camel/parser/xml/myrest.xml b/catalog/camel-route-parser/src/test/resources/org/apache/camel/parser/xml/myrest.xml index 82f493a..1d9bb7f 100644 --- a/catalog/camel-route-parser/src/test/resources/org/apache/camel/parser/xml/myrest.xml +++ b/catalog/camel-route-parser/src/test/resources/org/apache/camel/parser/xml/myrest.xml @@ -36,13 +36,13 @@ <rest path="/foo" consumes="xml" produces="json"> <description>my foo service</description> - <get uri="{id}" apiDocs="false"> + <get path="{id}" apiDocs="false"> <description>get by id</description> <to uri="log:id"/> </get> <post bindingMode="xml"> <description>post something</description> - <toD uri="log:post"/> + <to uri="log:post"/> </post> </rest> diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPCORSTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPCORSTest.java index bf11f02..38a3dfa 100644 --- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPCORSTest.java +++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPCORSTest.java @@ -45,7 +45,8 @@ public class CoAPCORSTest extends CoAPTestSupport { public void configure() { restConfiguration().component("coap").port(PORT).enableCORS(true); - rest().get("/rest").route().setBody(constant(COAP_RESPONSE)); + rest().get("/rest").to("direct:rest"); + from("direct:rest").setBody(constant(COAP_RESPONSE)); } }; } diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestContextPathTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestContextPathTest.java index 0da1b14..6ec9633 100644 --- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestContextPathTest.java +++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestContextPathTest.java @@ -41,7 +41,8 @@ public class CoAPRestContextPathTest extends CoAPTestSupport { public void configure() { restConfiguration().host("localhost").port(PORT).contextPath("/rest/services"); - rest("/test").get("/a").route().setBody(constant("GET: /test/a")); + rest("/test").get("/a").to("direct:a"); + from("direct:a").setBody(constant("GET: /test/a")); } }; } diff --git a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java index 872d83f..94c45b7 100644 --- a/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java +++ b/components/camel-coap/src/test/java/org/apache/camel/coap/CoAPRestVerbTest.java @@ -86,12 +86,17 @@ public class CoAPRestVerbTest extends CoAPTestSupport { public void configure() { restConfiguration().component("coap").host("localhost").port(PORT); - rest().get("/users").route().transform() - .constant("[{ \"id\":\"1\", \"name\":\"Scott\" },{ \"id\":\"2\", \"name\":\"Claus\" }]").endRest() - .get("/users/{id}") - .route().transform().simple("{ \"id\":\"${header.id}\", \"name\":\"Scott\" }").endRest().post("/users") - .to("mock:create").put("/users/{id}").to("mock:update") + rest() + .get("/users").to("direct:users") + .get("/users/{id}").to("direct:id") + .post("/users").to("mock:create") + .put("/users/{id}").to("mock:update") .delete("/users/{id}").to("mock:delete"); + + from("direct:users").transform() + .constant("[{ \"id\":\"1\", \"name\":\"Scott\" },{ \"id\":\"2\", \"name\":\"Claus\" }]"); + from("direct:id").transform() + .simple("{ \"id\":\"${header.id}\", \"name\":\"Scott\" }"); } }; } diff --git a/components/camel-lra/src/main/java/org/apache/camel/service/lra/LRASagaRoutes.java b/components/camel-lra/src/main/java/org/apache/camel/service/lra/LRASagaRoutes.java index b333965..23b7c68 100644 --- a/components/camel-lra/src/main/java/org/apache/camel/service/lra/LRASagaRoutes.java +++ b/components/camel-lra/src/main/java/org/apache/camel/service/lra/LRASagaRoutes.java @@ -39,8 +39,8 @@ public class LRASagaRoutes extends RouteBuilder { public void configure() throws Exception { rest(sagaService.getLocalParticipantContextPath()) - .put(PARTICIPANT_PATH_COMPENSATE) - .route().id("lra-compensation") + .put(PARTICIPANT_PATH_COMPENSATE).to("direct:lra-compensation"); + from("direct:lra-compensation").routeId("lra-compensation") .process(this::verifyRequest) .choice() .when(header(URL_COMPENSATION_KEY).isNotNull()) @@ -48,14 +48,13 @@ public class LRASagaRoutes extends RouteBuilder { .end(); rest(sagaService.getLocalParticipantContextPath()) - .put(PARTICIPANT_PATH_COMPLETE) - .route().id("lra-completion") + .put(PARTICIPANT_PATH_COMPLETE).to("direct:lra-completion"); + from("direct:lra-completion").routeId("lra-completion") .process(this::verifyRequest) .choice() .when(header(URL_COMPLETION_KEY).isNotNull()) .toD("${header." + URL_COMPLETION_KEY + "}") .end(); - } /** diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/ComplexTypesTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/ComplexTypesTest.java index 29d4d4d..a76f400 100644 --- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/ComplexTypesTest.java +++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/ComplexTypesTest.java @@ -71,9 +71,10 @@ public class ComplexTypesTest extends CamelTestSupport { .message("Receives a complex object as parameter") .endResponseMessage() .outType(SampleComplexResponseType.InnerClass.class) - .route() - .routeId("complex request type") - .log("/complex request invoked"); + .to("direct:request"); + from("direct:request") + .routeId("complex request type") + .log("/complex request invoked"); rest().get("/complexResponse") .description("Demo complex response type") @@ -86,10 +87,12 @@ public class ComplexTypesTest extends CamelTestSupport { .code(200) .message("Returns a complex object") .endResponseMessage() - .route() - .routeId("complex response type") - .log("/complex invoked") - .setBody(constant(new SampleComplexResponseType())); + .to("direct:response"); + + from("direct:response") + .routeId("complex response type") + .log("/complex invoked") + .setBody(constant(new SampleComplexResponseType())); } }; } diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiLicenseInfoTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiLicenseInfoTest.java index be9817b..fb99a6f 100644 --- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiLicenseInfoTest.java +++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiLicenseInfoTest.java @@ -46,10 +46,8 @@ public class RestOpenApiLicenseInfoTest { .apiProperty("api.license.url", "https://www.apache.org/licenses/LICENSE-2.0"); rest("/api") - .get("/api") - .route() - .setBody().constant("Hello World") - .end(); + .get("/api").to("direct:api"); + from("direct:api").setBody().constant("Hello World"); } }); diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiProcessorTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiProcessorTest.java index 1805812..af5787f 100644 --- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiProcessorTest.java +++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiProcessorTest.java @@ -39,8 +39,8 @@ public class RestOpenApiProcessorTest { context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { - rest().get("/foo").description("Foo endpoint").route().log("Hello /foo").endRest() - .post("/bar").description("Bar endpoint").route().log("Hello /foo").endRest(); + rest().get("/foo").description("Foo endpoint").to("mock:foo") + .post("/bar").description("Bar endpoint").to("mock:foo"); } }); @@ -62,8 +62,8 @@ public class RestOpenApiProcessorTest { context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { - rest().get("/foo").description("Foo endpoint").route().log("Hello /foo").endRest() - .post("/bar").description("Bar endpoint").route().log("Hello /foo").endRest(); + rest().get("/foo").description("Foo endpoint").to("mock:foo") + .post("/bar").description("Bar endpoint").to("mock:foo"); } }); @@ -87,8 +87,8 @@ public class RestOpenApiProcessorTest { context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { - rest().get("/foo").description("Foo endpoint").deprecated().route().log("Hello /foo").endRest() - .post("/bar").description("Bar endpoint").route().log("Hello /foo").endRest(); + rest().get("/foo").description("Foo endpoint").deprecated().to("mock:foo") + .post("/bar").description("Bar endpoint").to("mock:foo"); } }); @@ -116,8 +116,8 @@ public class RestOpenApiProcessorTest { context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { - rest().get("/foo").description("Foo endpoint").route().log("Hello /foo").endRest() - .post("/bar").description("Bar endpoint").route().log("Hello /foo").endRest(); + rest().get("/foo").description("Foo endpoint").to("mock:foo") + .post("/bar").description("Bar endpoint").to("mock:foo"); } }); @@ -141,8 +141,8 @@ public class RestOpenApiProcessorTest { context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { - rest().get("/foo").description("Foo endpoint").route().log("Hello /foo").endRest() - .post("/bar").description("Bar endpoint").route().log("Hello /foo").endRest(); + rest().get("/foo").description("Foo endpoint").to("mock:foo") + .post("/bar").description("Bar endpoint").to("mock:foo"); } }); @@ -167,8 +167,8 @@ public class RestOpenApiProcessorTest { context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { - rest().get("/foo").description("Foo endpoint").route().log("Hello /foo").endRest() - .post("/bar").description("Bar endpoint").route().log("Hello /foo").endRest(); + rest().get("/foo").description("Foo endpoint").to("mock:foo") + .post("/bar").description("Bar endpoint").to("mock:foo"); } }); diff --git a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java index 8374ee3..8354932 100644 --- a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java +++ b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java @@ -467,9 +467,9 @@ public class VertxPlatformHttpEngineTest { .post("/validate/body") .clientRequestValidation(true) .param().name("body").type(RestParamType.body).required(true).endParam() - .route() - .setBody(simple("Hello ${body}")) - .endRest(); + .to("direct:rest"); + from("direct:rest") + .setBody(simple("Hello ${body}")); } }); diff --git a/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/RestPlatformHttpContextPathConfigurationTest.java b/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/RestPlatformHttpContextPathConfigurationTest.java index 219d770..03ce639 100644 --- a/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/RestPlatformHttpContextPathConfigurationTest.java +++ b/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/RestPlatformHttpContextPathConfigurationTest.java @@ -42,21 +42,18 @@ public class RestPlatformHttpContextPathConfigurationTest extends AbstractPlatfo return new RouteBuilder() { @Override public void configure() throws Exception { - restConfiguration() .component("platform-http") .contextPath("/rest"); rest() - .get("/get") - .route() - .setBody(constant("GET: /get")) - .endRest() - .post("/post") - .consumes("text/plain").produces("text/plain") - .route() - .setBody(constant("POST: /post")) - .endRest(); + .get("/get").to("direct:get") + .post("/post").consumes("text/plain").produces("text/plain").to("direct:post"); + + from("direct:get") + .setBody(constant("GET: /get")); + from("direct:post") + .setBody(constant("POST: /post")); } }; 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 f0cb618..5b53cff 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 @@ -3991,12 +3991,10 @@ public final class ModelDeserializers extends YamlDeserializerSupport { @YamlProperty(name = "path", type = "string"), @YamlProperty(name = "produces", type = "string"), @YamlProperty(name = "response-message", type = "array:org.apache.camel.model.rest.RestOperationResponseMsgDefinition"), - @YamlProperty(name = "route", type = "object:org.apache.camel.model.RouteDefinition"), @YamlProperty(name = "security", type = "array:org.apache.camel.model.rest.SecurityDefinition"), @YamlProperty(name = "skip-binding-on-error-code", type = "boolean"), @YamlProperty(name = "steps", type = "array:org.apache.camel.model.ProcessorDefinition"), @YamlProperty(name = "to", type = "object:org.apache.camel.model.ToDefinition"), - @YamlProperty(name = "to-d", type = "object:org.apache.camel.model.ToDynamicDefinition"), @YamlProperty(name = "type", type = "string") } ) @@ -4079,24 +4077,9 @@ public final class ModelDeserializers extends YamlDeserializerSupport { target.setSkipBindingOnErrorCode(val); break; } - case "to-or-route": { - MappingNode val = asMappingNode(node); - setProperties(target, val); - break; - } case "to": { org.apache.camel.model.ToDefinition val = asType(node, org.apache.camel.model.ToDefinition.class); - target.setToOrRoute(val); - break; - } - case "to-d": { - org.apache.camel.model.ToDynamicDefinition val = asType(node, org.apache.camel.model.ToDynamicDefinition.class); - target.setToOrRoute(val); - break; - } - case "route": { - org.apache.camel.model.RouteDefinition val = asType(node, org.apache.camel.model.RouteDefinition.class); - target.setToOrRoute(val); + target.setTo(val); break; } case "type": { @@ -5356,12 +5339,10 @@ public final class ModelDeserializers extends YamlDeserializerSupport { @YamlProperty(name = "path", type = "string"), @YamlProperty(name = "produces", type = "string"), @YamlProperty(name = "response-message", type = "array:org.apache.camel.model.rest.RestOperationResponseMsgDefinition"), - @YamlProperty(name = "route", type = "object:org.apache.camel.model.RouteDefinition"), @YamlProperty(name = "security", type = "array:org.apache.camel.model.rest.SecurityDefinition"), @YamlProperty(name = "skip-binding-on-error-code", type = "boolean"), @YamlProperty(name = "steps", type = "array:org.apache.camel.model.ProcessorDefinition"), @YamlProperty(name = "to", type = "object:org.apache.camel.model.ToDefinition"), - @YamlProperty(name = "to-d", type = "object:org.apache.camel.model.ToDynamicDefinition"), @YamlProperty(name = "type", type = "string") } ) @@ -5444,24 +5425,9 @@ public final class ModelDeserializers extends YamlDeserializerSupport { target.setSkipBindingOnErrorCode(val); break; } - case "to-or-route": { - MappingNode val = asMappingNode(node); - setProperties(target, val); - break; - } case "to": { org.apache.camel.model.ToDefinition val = asType(node, org.apache.camel.model.ToDefinition.class); - target.setToOrRoute(val); - break; - } - case "to-d": { - org.apache.camel.model.ToDynamicDefinition val = asType(node, org.apache.camel.model.ToDynamicDefinition.class); - target.setToOrRoute(val); - break; - } - case "route": { - org.apache.camel.model.RouteDefinition val = asType(node, org.apache.camel.model.RouteDefinition.class); - target.setToOrRoute(val); + target.setTo(val); break; } case "type": { @@ -5787,12 +5753,10 @@ public final class ModelDeserializers extends YamlDeserializerSupport { @YamlProperty(name = "path", type = "string"), @YamlProperty(name = "produces", type = "string"), @YamlProperty(name = "response-message", type = "array:org.apache.camel.model.rest.RestOperationResponseMsgDefinition"), - @YamlProperty(name = "route", type = "object:org.apache.camel.model.RouteDefinition"), @YamlProperty(name = "security", type = "array:org.apache.camel.model.rest.SecurityDefinition"), @YamlProperty(name = "skip-binding-on-error-code", type = "boolean"), @YamlProperty(name = "steps", type = "array:org.apache.camel.model.ProcessorDefinition"), @YamlProperty(name = "to", type = "object:org.apache.camel.model.ToDefinition"), - @YamlProperty(name = "to-d", type = "object:org.apache.camel.model.ToDynamicDefinition"), @YamlProperty(name = "type", type = "string") } ) @@ -5875,24 +5839,9 @@ public final class ModelDeserializers extends YamlDeserializerSupport { target.setSkipBindingOnErrorCode(val); break; } - case "to-or-route": { - MappingNode val = asMappingNode(node); - setProperties(target, val); - break; - } case "to": { org.apache.camel.model.ToDefinition val = asType(node, org.apache.camel.model.ToDefinition.class); - target.setToOrRoute(val); - break; - } - case "to-d": { - org.apache.camel.model.ToDynamicDefinition val = asType(node, org.apache.camel.model.ToDynamicDefinition.class); - target.setToOrRoute(val); - break; - } - case "route": { - org.apache.camel.model.RouteDefinition val = asType(node, org.apache.camel.model.RouteDefinition.class); - target.setToOrRoute(val); + target.setTo(val); break; } case "type": { @@ -9559,12 +9508,10 @@ public final class ModelDeserializers extends YamlDeserializerSupport { @YamlProperty(name = "path", type = "string"), @YamlProperty(name = "produces", type = "string"), @YamlProperty(name = "response-message", type = "array:org.apache.camel.model.rest.RestOperationResponseMsgDefinition"), - @YamlProperty(name = "route", type = "object:org.apache.camel.model.RouteDefinition"), @YamlProperty(name = "security", type = "array:org.apache.camel.model.rest.SecurityDefinition"), @YamlProperty(name = "skip-binding-on-error-code", type = "boolean"), @YamlProperty(name = "steps", type = "array:org.apache.camel.model.ProcessorDefinition"), @YamlProperty(name = "to", type = "object:org.apache.camel.model.ToDefinition"), - @YamlProperty(name = "to-d", type = "object:org.apache.camel.model.ToDynamicDefinition"), @YamlProperty(name = "type", type = "string") } ) @@ -9647,24 +9594,9 @@ public final class ModelDeserializers extends YamlDeserializerSupport { target.setSkipBindingOnErrorCode(val); break; } - case "to-or-route": { - MappingNode val = asMappingNode(node); - setProperties(target, val); - break; - } case "to": { org.apache.camel.model.ToDefinition val = asType(node, org.apache.camel.model.ToDefinition.class); - target.setToOrRoute(val); - break; - } - case "to-d": { - org.apache.camel.model.ToDynamicDefinition val = asType(node, org.apache.camel.model.ToDynamicDefinition.class); - target.setToOrRoute(val); - break; - } - case "route": { - org.apache.camel.model.RouteDefinition val = asType(node, org.apache.camel.model.RouteDefinition.class); - target.setToOrRoute(val); + target.setTo(val); break; } case "type": { @@ -9930,12 +9862,10 @@ public final class ModelDeserializers extends YamlDeserializerSupport { @YamlProperty(name = "path", type = "string"), @YamlProperty(name = "produces", type = "string"), @YamlProperty(name = "response-message", type = "array:org.apache.camel.model.rest.RestOperationResponseMsgDefinition"), - @YamlProperty(name = "route", type = "object:org.apache.camel.model.RouteDefinition"), @YamlProperty(name = "security", type = "array:org.apache.camel.model.rest.SecurityDefinition"), @YamlProperty(name = "skip-binding-on-error-code", type = "boolean"), @YamlProperty(name = "steps", type = "array:org.apache.camel.model.ProcessorDefinition"), @YamlProperty(name = "to", type = "object:org.apache.camel.model.ToDefinition"), - @YamlProperty(name = "to-d", type = "object:org.apache.camel.model.ToDynamicDefinition"), @YamlProperty(name = "type", type = "string") } ) @@ -10018,24 +9948,9 @@ public final class ModelDeserializers extends YamlDeserializerSupport { target.setSkipBindingOnErrorCode(val); break; } - case "to-or-route": { - MappingNode val = asMappingNode(node); - setProperties(target, val); - break; - } case "to": { org.apache.camel.model.ToDefinition val = asType(node, org.apache.camel.model.ToDefinition.class); - target.setToOrRoute(val); - break; - } - case "to-d": { - org.apache.camel.model.ToDynamicDefinition val = asType(node, org.apache.camel.model.ToDynamicDefinition.class); - target.setToOrRoute(val); - break; - } - case "route": { - org.apache.camel.model.RouteDefinition val = asType(node, org.apache.camel.model.RouteDefinition.class); - target.setToOrRoute(val); + target.setTo(val); break; } case "type": { @@ -10427,12 +10342,10 @@ public final class ModelDeserializers extends YamlDeserializerSupport { @YamlProperty(name = "path", type = "string"), @YamlProperty(name = "produces", type = "string"), @YamlProperty(name = "response-message", type = "array:org.apache.camel.model.rest.RestOperationResponseMsgDefinition"), - @YamlProperty(name = "route", type = "object:org.apache.camel.model.RouteDefinition"), @YamlProperty(name = "security", type = "array:org.apache.camel.model.rest.SecurityDefinition"), @YamlProperty(name = "skip-binding-on-error-code", type = "boolean"), @YamlProperty(name = "steps", type = "array:org.apache.camel.model.ProcessorDefinition"), @YamlProperty(name = "to", type = "object:org.apache.camel.model.ToDefinition"), - @YamlProperty(name = "to-d", type = "object:org.apache.camel.model.ToDynamicDefinition"), @YamlProperty(name = "type", type = "string") } ) @@ -10515,24 +10428,9 @@ public final class ModelDeserializers extends YamlDeserializerSupport { target.setSkipBindingOnErrorCode(val); break; } - case "to-or-route": { - MappingNode val = asMappingNode(node); - setProperties(target, val); - break; - } case "to": { org.apache.camel.model.ToDefinition val = asType(node, org.apache.camel.model.ToDefinition.class); - target.setToOrRoute(val); - break; - } - case "to-d": { - org.apache.camel.model.ToDynamicDefinition val = asType(node, org.apache.camel.model.ToDynamicDefinition.class); - target.setToOrRoute(val); - break; - } - case "route": { - org.apache.camel.model.RouteDefinition val = asType(node, org.apache.camel.model.RouteDefinition.class); - target.setToOrRoute(val); + target.setTo(val); break; } case "type": {
