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

commit de4b638dc89d51735636e032a37b91d6f7ff83e4
Author: lburgazzoli <[email protected]>
AuthorDate: Mon Oct 14 16:43:20 2019 +0200

    chore: fix yaml based examples
---
 .../src/main/resources/env.json                    |   9 +-
 .../src/main/resources/routes.yaml                 |  23 +--
 .../data/env.json                                  |  12 +-
 .../data/routes.yaml                               |  29 ++--
 .../data/routes.yaml                               |  46 +++---
 .../src/main/resources/routes.yaml                 | 179 +++++++++++----------
 6 files changed, 155 insertions(+), 143 deletions(-)

diff --git 
a/examples/camel-k-runtime-example-knative/src/main/resources/env.json 
b/examples/camel-k-runtime-example-knative/src/main/resources/env.json
index 2220159..24dbf20 100644
--- a/examples/camel-k-runtime-example-knative/src/main/resources/env.json
+++ b/examples/camel-k-runtime-example-knative/src/main/resources/env.json
@@ -1,11 +1,12 @@
 {
-  "services": [
-     {
+  "services": [{
       "type": "endpoint",
-      "protocol": "http",
       "name": "from",
       "host": "0.0.0.0",
-      "port": 9090
+      "port": 9090,
+      "metadata": {
+        "camel.endpoint.kind": "source"
+      }
     }
   ]
 }
\ No newline at end of file
diff --git 
a/examples/camel-k-runtime-example-knative/src/main/resources/routes.yaml 
b/examples/camel-k-runtime-example-knative/src/main/resources/routes.yaml
index 43a2622..72b90e4 100644
--- a/examples/camel-k-runtime-example-knative/src/main/resources/routes.yaml
+++ b/examples/camel-k-runtime-example-knative/src/main/resources/routes.yaml
@@ -15,14 +15,15 @@
 # limitations under the License.
 #
 
-- id: "knative"
-  group: "routes"
-  from:
-    uri: "knative:endpoint/from"
-    steps:
-      - convert-body:
-          type: "java.lang.String"
-      - to:
-          uri: "log:knative"
-      - set-body:
-          constant: "Hello from camel-k (native)"
\ No newline at end of file
+- route:
+    id: "knative"
+    group: "routes"
+    from:
+      uri: "knative:endpoint/from"
+      steps:
+        - convert-body:
+            type: "java.lang.String"
+        - to:
+            uri: "log:knative"
+        - set-body:
+            constant: "Hello from camel-k (native)"
\ No newline at end of file
diff --git a/examples/camel-k-runtime-example-quarkus-knative/data/env.json 
b/examples/camel-k-runtime-example-quarkus-knative/data/env.json
index 5b44241..3a38ef7 100644
--- a/examples/camel-k-runtime-example-quarkus-knative/data/env.json
+++ b/examples/camel-k-runtime-example-quarkus-knative/data/env.json
@@ -2,16 +2,20 @@
     "services": [
       {
         "type": "endpoint",
-        "protocol": "http",
         "name": "sink",
         "host": "0.0.0.0",
-        "port": 9091
+        "port": 9091,
+        "metadata": {
+          "camel.endpoint.kind": "sink"
+        }
       }, {
         "type": "endpoint",
-        "protocol": "http",
         "name": "source",
         "host": "0.0.0.0",
-        "port": 9090
+        "port": 9090,
+        "metadata": {
+          "camel.endpoint.kind": "source"
+        }
       }
     ]
 }
\ No newline at end of file
diff --git a/examples/camel-k-runtime-example-quarkus-knative/data/routes.yaml 
b/examples/camel-k-runtime-example-quarkus-knative/data/routes.yaml
index ce1e634..e0559a5 100644
--- a/examples/camel-k-runtime-example-quarkus-knative/data/routes.yaml
+++ b/examples/camel-k-runtime-example-quarkus-knative/data/routes.yaml
@@ -15,18 +15,19 @@
 # limitations under the License.
 #
 
-- id: "knative"
-  group: "routes"
-  from:
-    uri: "knative://endpoint/source"
-    steps:
-      - convert-body:
-          type: "java.lang.String"
-      - choice:
-          when:
-            - simple: "${body} >= 100"
+- route:
+    id: "knative"
+    group: "routes"
+    from:
+      uri: "knative://endpoint/source"
+      steps:
+        - convert-body:
+            type: "java.lang.String"
+        - choice:
+            when:
+              - simple: "${body} >= 100"
+                steps:
+                  - to: "log:when"
+            otherwise:
               steps:
-                - to: "log:when"
-          otherwise:
-            steps:
-              - to: "log:otherwise"
\ No newline at end of file
+                - to: "log:otherwise"
\ No newline at end of file
diff --git a/examples/camel-k-runtime-example-quarkus-yaml/data/routes.yaml 
b/examples/camel-k-runtime-example-quarkus-yaml/data/routes.yaml
index d45b65a..b5015ee 100644
--- a/examples/camel-k-runtime-example-quarkus-yaml/data/routes.yaml
+++ b/examples/camel-k-runtime-example-quarkus-yaml/data/routes.yaml
@@ -15,25 +15,27 @@
 # limitations under the License.
 #
 
-- id: "flow-1"
-  group: "routes"
-  from:
-    uri: "netty-http:localhost:8080"
-    steps:
-      - convert-body:
-          type: "java.lang.String"
-      - to:
-          uri: "log:info"
-- id: "flow-2"
-  group: "routes"
-  from:
-    uri: "timer:tick"
-    parameters:
-      period: "5s"
-    steps:
-      - set-body:
-          simple: "${exchangeProperty.CamelTimerName} -> 
${exchangeProperty.CamelTimerCounter}"
-      - to:
-          uri: "log:tick"
-      - log:
-          message: "{{message}}"
\ No newline at end of file
+- route:
+    id: "flow-1"
+    group: "routes"
+    from:
+      uri: "netty-http:localhost:8080"
+      steps:
+        - convert-body:
+            type: "java.lang.String"
+        - to:
+            uri: "log:info"
+- route:
+    id: "flow-2"
+    group: "routes"
+    from:
+      uri: "timer:tick"
+      parameters:
+        period: "5s"
+      steps:
+        - set-body:
+            simple: "${exchangeProperty.CamelTimerName} -> 
${exchangeProperty.CamelTimerCounter}"
+        - to:
+            uri: "log:tick"
+        - log:
+            message: "{{message}}"
\ No newline at end of file
diff --git 
a/examples/camel-k-runtime-example-yaml/src/main/resources/routes.yaml 
b/examples/camel-k-runtime-example-yaml/src/main/resources/routes.yaml
index 6fd82ab..ec7bb5b 100644
--- a/examples/camel-k-runtime-example-yaml/src/main/resources/routes.yaml
+++ b/examples/camel-k-runtime-example-yaml/src/main/resources/routes.yaml
@@ -15,91 +15,94 @@
 # limitations under the License.
 #
 
-- id: "rest"
-  group: "routes"
-  rest:
-    verb: "post"
-    uri: "/api/route"
-    accepts: "text/plain"
-    binding-mode: "off"
-    steps:
-      - convert-body:
-          type: "java.lang.String"
-      - to:
-          uri: "log:in"
-      - choice:
-          when:
-            - simple: "${body.contains(\",\")}"
-              steps:
-                - split:
-                    tokenize: ","
-                    steps:
-                      - set-body:
-                          simple: "${body.toUpperCase()}"
-                      - to:
-                          uri: "log:contains-1"
-            - simple: "${body.contains(\";\")}"
-              steps:
-                - split:
-                    tokenize: ";"
-                    steps:
-                      - set-body:
-                          simple: "${body.toLowerCase()}"
-                      - to:
-                          uri: "log:contains2"
-      - marshal:
-          json: {}
-      - convert-body:
-          type: "java.lang.String"
-      - to:
-          uri: "log:out"
-- id: "flow"
-  group: "routes"
-  rest:
-    verb: "post"
-    uri: "/api/flow"
-    accepts: "text/plain"
-    binding-mode: "off"
-    steps:
-      - convert-body:
-          type: "java.lang.String"
-      - to:
-          uri: "log:in"
-      - filter:
-          simple: "${body.contains(\",\")}"
-      - split:
-          tokenize: ";"
-      - set-body:
-          simple: "${body.toLowerCase()}"
-      - to:
-          uri: "log:out"
-- id: "rest+flow"
-  group: "routes"
-  rest:
-    verb: "post"
-    uri: "/api/floute"
-    accepts: "text/plain"
-    binding-mode: "off"
-    steps:
-      - convert-body:
-          type: "java.lang.String"
-      - to:
-          uri: "log:in"
-      - choice:
-          when:
-            - simple: "${body.contains(\",\")}"
-              steps:
-                - split:
-                    tokenize: ","
-                - set-body:
-                    simple: "${body.toUpperCase()}"
-                - to:
-                    uri: "log:contains-1"
-            - simple: "${body.contains(\";\")}"
-              steps:
-                - split:
-                    tokenize: ";"
-                - set-body:
-                    simple: "${body.toLowerCase()}"
-                - to:
-                    uri: "log:contains2"
\ No newline at end of file
+- route:
+    id: "rest"
+    group: "routes"
+    rest:
+      verb: "post"
+      uri: "/api/route"
+      accepts: "text/plain"
+      binding-mode: "off"
+      steps:
+        - convert-body:
+            type: "java.lang.String"
+        - to:
+            uri: "log:in"
+        - choice:
+            when:
+              - simple: "${body.contains(\",\")}"
+                steps:
+                  - split:
+                      tokenize: ","
+                      steps:
+                        - set-body:
+                            simple: "${body.toUpperCase()}"
+                        - to:
+                            uri: "log:contains-1"
+              - simple: "${body.contains(\";\")}"
+                steps:
+                  - split:
+                      tokenize: ";"
+                      steps:
+                        - set-body:
+                            simple: "${body.toLowerCase()}"
+                        - to:
+                            uri: "log:contains2"
+        - marshal:
+            json: {}
+        - convert-body:
+            type: "java.lang.String"
+        - to:
+            uri: "log:out"
+- route:
+    id: "flow"
+    group: "routes"
+    rest:
+      verb: "post"
+      uri: "/api/flow"
+      accepts: "text/plain"
+      binding-mode: "off"
+      steps:
+        - convert-body:
+            type: "java.lang.String"
+        - to:
+            uri: "log:in"
+        - filter:
+            simple: "${body.contains(\",\")}"
+        - split:
+            tokenize: ";"
+        - set-body:
+            simple: "${body.toLowerCase()}"
+        - to:
+            uri: "log:out"
+- route:
+    id: "rest+flow"
+    group: "routes"
+    rest:
+      verb: "post"
+      uri: "/api/floute"
+      accepts: "text/plain"
+      binding-mode: "off"
+      steps:
+        - convert-body:
+            type: "java.lang.String"
+        - to:
+            uri: "log:in"
+        - choice:
+            when:
+              - simple: "${body.contains(\",\")}"
+                steps:
+                  - split:
+                      tokenize: ","
+                  - set-body:
+                      simple: "${body.toUpperCase()}"
+                  - to:
+                      uri: "log:contains-1"
+              - simple: "${body.contains(\";\")}"
+                steps:
+                  - split:
+                      tokenize: ";"
+                  - set-body:
+                      simple: "${body.toLowerCase()}"
+                  - to:
+                      uri: "log:contains2"
\ No newline at end of file

Reply via email to