This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-jbang-examples.git
The following commit(s) were added to refs/heads/main by this push:
new 5b23b7d CAMEL-23863: Fix invalid YAML in rest-api example (#68)
5b23b7d is described below
commit 5b23b7d265452eade1efca84e7edf3084e336586
Author: Adriano Machado <[email protected]>
AuthorDate: Wed Jul 1 00:53:17 2026 -0400
CAMEL-23863: Fix invalid YAML in rest-api example (#68)
The rest DSL block nested the GET verbs under an unsupported `steps:`
key, which the Camel YAML DSL rejects at parse time. Use the proper
`get:` verb list with explicit `to:` targets wiring each verb to its
direct route, matching the canonical Camel YAML rest DSL structure.
Co-authored-by: Claude Opus 4.8 <[email protected]>
---
rest-api/rest-api.camel.yaml | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/rest-api/rest-api.camel.yaml b/rest-api/rest-api.camel.yaml
index d070e85..65232bd 100644
--- a/rest-api/rest-api.camel.yaml
+++ b/rest-api/rest-api.camel.yaml
@@ -1,10 +1,12 @@
- rest:
path: /api
- steps:
- - get:
- path: /hello
- - get:
- path: "/hello/{name}"
+ get:
+ - path: /hello
+ to:
+ uri: direct:hello
+ - path: "/hello/{name}"
+ to:
+ uri: direct:hello-name
- route:
id: hello
from: