This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new eebdd34bb5 Remove inline routes from platform-http REST DSL docs
eebdd34bb5 is described below
commit eebdd34bb5de55ff7133ad646559c26190d420bd
Author: James Netherton <[email protected]>
AuthorDate: Mon Jul 4 08:28:38 2022 +0100
Remove inline routes from platform-http REST DSL docs
---
.../ROOT/pages/reference/extensions/platform-http.adoc | 12 ++++--------
extensions/platform-http/runtime/src/main/doc/usage.adoc | 12 ++++--------
2 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/platform-http.adoc
b/docs/modules/ROOT/pages/reference/extensions/platform-http.adoc
index 5728b3d0cf..97a0a27498 100644
--- a/docs/modules/ROOT/pages/reference/extensions/platform-http.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/platform-http.adoc
@@ -62,7 +62,7 @@
from("platform-http:/hello?httpMethodRestrict=GET").setBody(simple("Hello ${head
=== Using `platform-http` via Camel REST DSL
-To be able to use Camel REST DSL with the `platform-http` component, add
`camel-quarkus-rest` in addition to `camel-quarkus-platform-http` to your
`pom.xml`:
+To be able to use Camel REST DSL with the `platform-http` component, add
`camel-quarkus-rest` to your `pom.xml`:
[source,xml]
----
@@ -78,16 +78,12 @@ Then you can use the Camel REST DSL:
----
rest()
.get("/my-get-endpoint")
- .route()
- .setBody(constant("Hello from /my-get-endpoint"))
- .endRest()
+ .to("direct:handleGetRequest");
+
.post("/my-post-endpoint")
- .route()
- .setBody(constant("Hello from /my-post-endpoint"))
- .endRest();
+ .to("direct:handlePostRequest");
----
-
=== Handling `multipart/form-data` file uploads
You can restrict the uploads to certain file extensions by white listing them:
diff --git a/extensions/platform-http/runtime/src/main/doc/usage.adoc
b/extensions/platform-http/runtime/src/main/doc/usage.adoc
index 32ccad8b52..7fd9d9ee0f 100644
--- a/extensions/platform-http/runtime/src/main/doc/usage.adoc
+++ b/extensions/platform-http/runtime/src/main/doc/usage.adoc
@@ -16,7 +16,7 @@
from("platform-http:/hello?httpMethodRestrict=GET").setBody(simple("Hello ${head
=== Using `platform-http` via Camel REST DSL
-To be able to use Camel REST DSL with the `platform-http` component, add
`camel-quarkus-rest` in addition to `camel-quarkus-platform-http` to your
`pom.xml`:
+To be able to use Camel REST DSL with the `platform-http` component, add
`camel-quarkus-rest` to your `pom.xml`:
[source,xml]
----
@@ -32,16 +32,12 @@ Then you can use the Camel REST DSL:
----
rest()
.get("/my-get-endpoint")
- .route()
- .setBody(constant("Hello from /my-get-endpoint"))
- .endRest()
+ .to("direct:handleGetRequest");
+
.post("/my-post-endpoint")
- .route()
- .setBody(constant("Hello from /my-post-endpoint"))
- .endRest();
+ .to("direct:handlePostRequest");
----
-
=== Handling `multipart/form-data` file uploads
You can restrict the uploads to certain file extensions by white listing them: