You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/12/21 12:20:22 UTC

[camel-kamelets] 02/05: Added Json Patch Action Kamelet

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

acosentino pushed a commit to branch json-patch-action
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 3a1bccc99f7c3f10c31efa0ef3afd98b4d549449
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Dec 21 13:18:27 2021 +0100

    Added Json Patch Action Kamelet
---
 .../kamelets/json-patch-action.kamelet.yaml        | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/json-patch-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/json-patch-action.kamelet.yaml
new file mode 100644
index 0000000..bc11a3d
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/json-patch-action.kamelet.yaml
@@ -0,0 +1,54 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: json-patch-action
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "main-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Actions"
+  labels:
+    camel.apache.org/kamelet.type: "action"
+spec:
+  definition:
+    title: "Json Patch Action"
+    description: |-
+      Apply a Json Patch Transformation.
+
+      The template property needs to be encoded in base64, so when you pass it as parameter, don't forget to encode it.
+    required:
+      - template
+    type: object
+    properties:
+      template:
+        title: Template
+        description: The json patch transformation
+        type: binary
+  dependencies:
+  - "camel:json-patch"
+  - "camel:kamelet"
+  flow:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - to:
+          uri: "json-patch:"
+          parameters:
+            resourceUri: "base64:{{template}}"