This is an automated email from the ASF dual-hosted git repository.
ppalaga pushed a commit to branch 2.10.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/2.10.x by this push:
new ce42f3e945 Update rest.adoc
ce42f3e945 is described below
commit ce42f3e945ba8032acd23fd777696a18bee3c534
Author: Diego Betancourt <[email protected]>
AuthorDate: Wed Jul 13 13:59:53 2022 -0500
Update rest.adoc
According to the guide
https://camel.apache.org/manual/camel-3x-upgrade-guide-3_16.html#_removed_support_for_embedded_routes
Support for embedded routes in the REST DSL was removed in Camel 3.16.0.
---
.../ROOT/pages/reference/extensions/rest.adoc | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/rest.adoc
b/docs/modules/ROOT/pages/reference/extensions/rest.adoc
index a84a98a94a..2905e10aad 100644
--- a/docs/modules/ROOT/pages/reference/extensions/rest.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/rest.adoc
@@ -59,18 +59,18 @@ public class CamelRoute extends RouteBuilder {
@Override
public void configure() {
+ from("direct:set-body")
+ .setBody(constant("Hello World"));
+
+ rest("/api")
+ // Dash '-' is not allowed by default
+ .get("/dashed/param/{my-param}")
+ .to("direct:set-body");
+
rest("/api")
- // Dash '-' is not allowed by default
- .get("/dashed/param/{my-param}")
- .route()
- .setBody(constant("Hello World"))
- .endRest()
-
- // The non-dashed path parameter works by default
- .get("/undashed/param/{myParam}")
- .route()
- .setBody(constant("Hello World"))
- .endRest();
+ // The non-dashed path parameter works by default
+ .get("/undashed/param/{myParam}")
+ .to("direct:set-body");
}
}
----