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/05/06 16:47:32 UTC
[camel-kamelets] 02/03: Replace Field: Set JsonNode as expected
input and output
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch replace-field
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 29b35f3fd27072cbb9f8fa7e86f470b6066ca844
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu May 6 18:46:29 2021 +0200
Replace Field: Set JsonNode as expected input and output
---
.../main/resources/kamelets/replace-field-action.kamelet.yaml | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/library/camel-kamelets-catalog/src/main/resources/kamelets/replace-field-action.kamelet.yaml b/library/camel-kamelets-catalog/src/main/resources/kamelets/replace-field-action.kamelet.yaml
index 77fd0c7..03fabe8 100644
--- a/library/camel-kamelets-catalog/src/main/resources/kamelets/replace-field-action.kamelet.yaml
+++ b/library/camel-kamelets-catalog/src/main/resources/kamelets/replace-field-action.kamelet.yaml
@@ -7,11 +7,10 @@ metadata:
annotations:
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"
spec:
definition:
title: "Replace Field Action"
- description: "Replaces a field with a constant value in the message in transit"
+ description: "Adds a custom field with a constant value to the message in transit"
required:
- enabled
- disabled
@@ -42,7 +41,9 @@ spec:
- simple: "${header[Content-Type]} == 'application/json'"
steps:
- unmarshal:
- json: {}
+ json:
+ library: Jackson
+ unmarshalTypeName: com.fasterxml.jackson.databind.JsonNode
- set-property:
name: "enabled"
constant: "{{enabled}}"
@@ -54,7 +55,9 @@ spec:
constant: "{{renames}}"
- bean: "org.apache.camel.kamelets.utils.transform.ReplaceField"
- marshal:
- json: {}
+ json:
+ library: Jackson
+ unmarshalTypeName: com.fasterxml.jackson.databind.JsonNode
- set-header:
name: "Content-Type"
constant: "application/json"