You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2021/04/30 14:01:48 UTC

[camel-kamelets] branch main updated: Regen for commit c537814e580033d6c06d0c5252c4c37bb9ca6623

This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


The following commit(s) were added to refs/heads/main by this push:
     new 0c668d9  Regen for commit c537814e580033d6c06d0c5252c4c37bb9ca6623
0c668d9 is described below

commit 0c668d93369e231d10f4341cdd376974a0dda6c2
Author: nicolaferraro <ni...@users.noreply.github.com>
AuthorDate: Fri Apr 30 13:45:00 2021 +0000

    Regen for commit c537814e580033d6c06d0c5252c4c37bb9ca6623
    
    Signed-off-by: GitHub <no...@github.com>
---
 .../kamelets/insert-field-action.kamelet.yaml      | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/library/camel-kamelets-catalog/src/main/resources/kamelets/insert-field-action.kamelet.yaml b/library/camel-kamelets-catalog/src/main/resources/kamelets/insert-field-action.kamelet.yaml
new file mode 100644
index 0000000..573af26
--- /dev/null
+++ b/library/camel-kamelets-catalog/src/main/resources/kamelets/insert-field-action.kamelet.yaml
@@ -0,0 +1,50 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: insert-field-action
+  labels:
+    camel.apache.org/kamelet.type: "action"
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+spec:
+  definition:
+    title: "Insert Field"
+    description: "Adds a custom field with a constant value to the message in transit"
+    required:
+      - field
+      - value
+    properties:
+      field:
+        title: Field
+        description: The name of the field to be added
+        type: string
+      value:
+        title: Value
+        description: The value of the field
+        type: string
+    type: object
+  dependencies:
+  - github:apache.camel-kamelets:camel-kamelets-utils:main-SNAPSHOT
+  flow:
+    from:
+      uri: kamelet:source
+      steps:
+      - choice:
+          when:
+          - simple: "${header[Content-Type]} == 'application/json'"
+            steps:
+            - unmarshal:
+                json: {}
+      - set-property:
+          name: "field"
+          constant: "{{field}}"
+      - set-property:
+          name: "value"
+          constant: "{{value}}"
+      - bean: "org.apache.camel.kamelets.utils.transform.InsertField"
+      - marshal:
+          json: {}
+      - set-header:
+          name: "Content-Type"
+          constant: "application/json"