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
The following commit(s) were added to refs/heads/rest-to by this push: new a066cc8 CAMEL-17675: camel-core - Rest DSL remove support for using inlined routes. a066cc8 is described below commit a066cc8b77a0bfd99aa900f302c2374086ab7868 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue Feb 22 15:59:16 2022 +0100 CAMEL-17675: camel-core - Rest DSL remove support for using inlined routes. --- .../camel/component/jetty/rest/RestJettyGetToDTest.java | 2 +- .../camel/component/jetty/rest/RestJettyBasicAuthTest.xml | 13 ++++++++----- .../netty/http/rest/RestProducerOutTypeBindingTest.java | 2 +- .../undertow/rest/RestUndertowHttpPojoTypeTest.java | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyGetToDTest.java b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyGetToDTest.java index 2659b0c..684db45 100644 --- a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyGetToDTest.java +++ b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/rest/RestJettyGetToDTest.java @@ -48,7 +48,7 @@ public class RestJettyGetToDTest extends BaseJettyTest { // use the rest DSL to define the rest services rest("/users/").get("{id}/basic").to("direct:basic"); - from("direct:basic").to("seda:${header.id}"); + from("direct:basic").toD("seda:${header.id}"); from("seda:123").to("mock:input").process(new Processor() { public void process(Exchange exchange) throws Exception { String id = exchange.getIn().getHeader("id", String.class); diff --git a/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/rest/RestJettyBasicAuthTest.xml b/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/rest/RestJettyBasicAuthTest.xml index 012f30c..8bad9ac 100644 --- a/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/rest/RestJettyBasicAuthTest.xml +++ b/components/camel-jetty/src/test/resources/org/apache/camel/component/jetty/rest/RestJettyBasicAuthTest.xml @@ -67,13 +67,16 @@ <rest> <get path="/ping"> - <route> - <setBody> - <constant>pong</constant> - </setBody> - </route> + <to uri="direct:ping"/> </get> </rest> + <route> + <from uri="direct:ping"/> + <setBody> + <constant>pong</constant> + </setBody> + </route> + </camelContext> </beans> diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/rest/RestProducerOutTypeBindingTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/rest/RestProducerOutTypeBindingTest.java index 2ad190a..c781bf7 100644 --- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/rest/RestProducerOutTypeBindingTest.java +++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/rest/RestProducerOutTypeBindingTest.java @@ -93,7 +93,7 @@ public class RestProducerOutTypeBindingTest extends BaseNettyTest { from("direct:r1") .log("Got req1") .setBody(constant(new Resp1("1"))); - from("direct:r1") + from("direct:r2") .log("Got req2") .setBody(constant(new Resp2(null, "2"))) .end(); diff --git a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowHttpPojoTypeTest.java b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowHttpPojoTypeTest.java index dee8d36..5ebf326 100644 --- a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowHttpPojoTypeTest.java +++ b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowHttpPojoTypeTest.java @@ -264,8 +264,8 @@ public class RestUndertowHttpPojoTypeTest extends BaseUndertowTest { // use the rest DSL to define the rest services rest() - .get("/users").outType(UserPojo[].class).to("direct:users") - .get("/users/list").outType(UserPojo[].class).to("direct:list") + .get("/users").id("getUsers").outType(UserPojo[].class).to("direct:users") + .get("/users/list").id("getUsersList").outType(UserPojo[].class).to("direct:list") .get("/users/{id}").id("getUser").outType(UserPojo.class).to("direct:id") .put("/users/{id}").id("putUser").type(UserPojo.class).to("mock:putUser") .put("/users").id("putUsers").type(UserPojo[].class).to("mock:putUsers")