You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2022/08/16 13:46:54 UTC
[camel-quarkus] branch 2.11.x updated: Remove documentation references to REST DSL inline routes
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch 2.11.x
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/2.11.x by this push:
new e50ec3c6f7 Remove documentation references to REST DSL inline routes
e50ec3c6f7 is described below
commit e50ec3c6f7f5453bd1b66ae912af254b3d7c9105
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Aug 16 09:20:50 2022 +0100
Remove documentation references to REST DSL inline routes
Fixes #3995
---
docs/modules/ROOT/pages/reference/extensions/rest.adoc | 11 +++++------
extensions/rest/runtime/src/main/doc/configuration.adoc | 11 +++++------
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/rest.adoc b/docs/modules/ROOT/pages/reference/extensions/rest.adoc
index a84a98a94a..5622dfd06d 100644
--- a/docs/modules/ROOT/pages/reference/extensions/rest.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/rest.adoc
@@ -62,15 +62,14 @@ public class CamelRoute extends RouteBuilder {
rest("/api")
// Dash '-' is not allowed by default
.get("/dashed/param/{my-param}")
- .route()
- .setBody(constant("Hello World"))
- .endRest()
+ .to("direct:greet")
// The non-dashed path parameter works by default
.get("/undashed/param/{myParam}")
- .route()
- .setBody(constant("Hello World"))
- .endRest();
+ .to("direct:greet");
+
+ from("direct:greet")
+ .setBody(constant("Hello World"));
}
}
----
diff --git a/extensions/rest/runtime/src/main/doc/configuration.adoc b/extensions/rest/runtime/src/main/doc/configuration.adoc
index ca2db25992..9db88977f4 100644
--- a/extensions/rest/runtime/src/main/doc/configuration.adoc
+++ b/extensions/rest/runtime/src/main/doc/configuration.adoc
@@ -18,15 +18,14 @@ public class CamelRoute extends RouteBuilder {
rest("/api")
// Dash '-' is not allowed by default
.get("/dashed/param/{my-param}")
- .route()
- .setBody(constant("Hello World"))
- .endRest()
+ .to("direct:greet")
// The non-dashed path parameter works by default
.get("/undashed/param/{myParam}")
- .route()
- .setBody(constant("Hello World"))
- .endRest();
+ .to("direct:greet");
+
+ from("direct:greet")
+ .setBody(constant("Hello World"));
}
}
----