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/10 14:44:13 UTC
[camel-kamelets] branch main updated (78df0a5 -> dd14c5e)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.
from 78df0a5 Regen catalog
new b33a80c Insert field action - Actions should not marshal into JSON if the input was not JSON
new dd14c5e Regen catalog
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
insert-field-action.kamelet.yaml | 21 ++++++++++++++-------
.../kamelets/insert-field-action.kamelet.yaml | 21 ++++++++++++++-------
2 files changed, 28 insertions(+), 14 deletions(-)
[camel-kamelets] 02/02: Regen catalog
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit dd14c5efc73355390704bbaead8e09c19a9d0a4c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon May 10 16:36:32 2021 +0200
Regen catalog
---
.../kamelets/insert-field-action.kamelet.yaml | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
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
index aaf1497..f0b6cca 100644
--- 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
@@ -38,6 +38,9 @@ spec:
when:
- simple: "${header[Content-Type]} == 'application/json'"
steps:
+ - set-property:
+ name: deserialized
+ constant: "true"
- unmarshal:
json:
library: Jackson
@@ -49,10 +52,14 @@ spec:
name: "value"
constant: "{{value}}"
- bean: "org.apache.camel.kamelets.utils.transform.InsertField"
- - marshal:
- json:
- library: Jackson
- unmarshalTypeName: com.fasterxml.jackson.databind.JsonNode
- - set-header:
- name: "Content-Type"
- constant: "application/json"
+ - choice:
+ when:
+ - simple: "${exchangeProperty[deserialized]} == 'true'"
+ steps:
+ - marshal:
+ json:
+ library: Jackson
+ unmarshalTypeName: com.fasterxml.jackson.databind.JsonNode
+ - set-header:
+ name: "Content-Type"
+ constant: "application/json"
[camel-kamelets] 01/02: Insert field action - Actions should not
marshal into JSON if the input was not JSON
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit b33a80c39a9a09033447674430d40387fea3ba78
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon May 10 16:36:08 2021 +0200
Insert field action - Actions should not marshal into JSON if the input was not JSON
---
insert-field-action.kamelet.yaml | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/insert-field-action.kamelet.yaml b/insert-field-action.kamelet.yaml
index aaf1497..f0b6cca 100644
--- a/insert-field-action.kamelet.yaml
+++ b/insert-field-action.kamelet.yaml
@@ -38,6 +38,9 @@ spec:
when:
- simple: "${header[Content-Type]} == 'application/json'"
steps:
+ - set-property:
+ name: deserialized
+ constant: "true"
- unmarshal:
json:
library: Jackson
@@ -49,10 +52,14 @@ spec:
name: "value"
constant: "{{value}}"
- bean: "org.apache.camel.kamelets.utils.transform.InsertField"
- - marshal:
- json:
- library: Jackson
- unmarshalTypeName: com.fasterxml.jackson.databind.JsonNode
- - set-header:
- name: "Content-Type"
- constant: "application/json"
+ - choice:
+ when:
+ - simple: "${exchangeProperty[deserialized]} == 'true'"
+ steps:
+ - marshal:
+ json:
+ library: Jackson
+ unmarshalTypeName: com.fasterxml.jackson.databind.JsonNode
+ - set-header:
+ name: "Content-Type"
+ constant: "application/json"