You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2020/09/28 08:51:55 UTC
[camel-k-runtime] branch master updated: yaml dsl: add
documentation for endpoint-dsl support #484
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git
The following commit(s) were added to refs/heads/master by this push:
new 59c1a10 yaml dsl: add documentation for endpoint-dsl support #484
59c1a10 is described below
commit 59c1a10ed0aa9f4412d03cd63f89de6cccaa9c87
Author: Luca Burgazzoli <lb...@gmail.com>
AuthorDate: Mon Sep 28 09:57:07 2020 +0200
yaml dsl: add documentation for endpoint-dsl support #484
---
docs/modules/languages/pages/yaml.adoc | 51 ++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/docs/modules/languages/pages/yaml.adoc b/docs/modules/languages/pages/yaml.adoc
index c94e563..65af468 100644
--- a/docs/modules/languages/pages/yaml.adoc
+++ b/docs/modules/languages/pages/yaml.adoc
@@ -112,6 +112,57 @@ set-body:
In case you want to use the data-format's default settings, you need to place an empty block as data format parameters, like `json: {}`
====
+== Defining endpoints
+
+To define an endpoint with the YAML dsl you have three options:
+
+. Using a classic Camel URI:
++
+[source,yaml]
+----
+- from:
+ uri: "timer:tick?period=1s"
+ steps:
+ - to:
+ uri: "telegram:bots?authorizationToken=XXX"
+----
+. Using URI and parameters:
++
+[source,yaml]
+----
+- from:
+ uri: "timer://tick"
+ parameters:
+ period: "1s"
+ steps:
+ - to:
+ uri: "telegram:bots"
+ parameters:
+ authorizationToken: "XXX"
+----
+. Using the YAML implementation of the https://camel.apache.org/manual/latest/Endpoint-dsl.html[Endpoint DSL]:
++
+[source,yaml]
+----
+- from:
+ timer:
+ name: "tick"
+ period: "1s"
+ steps:
+ - telegram:
+ type: "bots"
+ authorizationToken: "XXX"
+----
+
+[WARNING]
+====
+Support for the Endpoint DSL with YAML is experimental and subject to changes.
+====
+[NOTE]
+====
+Support for Endpoint DSL auto completion https://github.com/apache/camel-k-runtime/issues/485[is not yet available].
+====
+
== Defining beans
In addition to the general support for creating beans provided by https://camel.apache.org/components/latest/others/main.html#_specifying_custom_beans[Camel Main], the YAML DSL provide a convenient syntax to define and configure them: