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 15:42:06 UTC
[camel-kamelets] 02/02: Mask 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 mask-field-jsonNode
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit ff255515fe53a2d700ba19864abe4d7df6d83866
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu May 6 17:38:51 2021 +0200
Mask Field: Set JsonNode as expected input and output
---
.../src/main/resources/kamelets/mask-field-action.kamelet.yaml | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/library/camel-kamelets-catalog/src/main/resources/kamelets/mask-field-action.kamelet.yaml b/library/camel-kamelets-catalog/src/main/resources/kamelets/mask-field-action.kamelet.yaml
index 960c894..d1b312d 100644
--- a/library/camel-kamelets-catalog/src/main/resources/kamelets/mask-field-action.kamelet.yaml
+++ b/library/camel-kamelets-catalog/src/main/resources/kamelets/mask-field-action.kamelet.yaml
@@ -10,7 +10,7 @@ metadata:
camel.apache.org/kamelet.group: "Actions"
spec:
definition:
- title: "Mask Fields Action"
+ title: "Mask Fields"
description: "Mask fields with a constant value in the message in transit"
required:
- fields
@@ -36,7 +36,9 @@ spec:
- simple: "${header[Content-Type]} == 'application/json'"
steps:
- unmarshal:
- json: {}
+ json:
+ library: Jackson
+ unmarshalTypeName: com.fasterxml.jackson.databind.JsonNode
- set-property:
name: "fields"
constant: "{{fields}}"
@@ -45,7 +47,9 @@ spec:
constant: "{{replacement}}"
- bean: "org.apache.camel.kamelets.utils.transform.MaskField"
- marshal:
- json: {}
+ json:
+ library: Jackson
+ unmarshalTypeName: com.fasterxml.jackson.databind.JsonNode
- set-header:
name: "Content-Type"
constant: "application/json"