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 13:24:31 UTC
[camel-kamelets] branch replace-action-261 created (now 83d7f4e)
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a change to branch replace-action-261
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.
at 83d7f4e Regen
This branch includes the following new commits:
new 682c665 Replace Field Action - Actions should not marshal into JSON if the input was not JSON
new 3083684 Regen catalog
new 83d7f4e Regen
The 3 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.
[camel-kamelets] 02/03: 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 replace-action-261
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 30836842ca6bf37e7fe6cd649dc1c251aa27a476
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon May 10 15:23:54 2021 +0200
Regen catalog
---
.../kamelets/replace-field-action.kamelet.yaml | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 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 61fd23e..c6f00b9 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
@@ -44,6 +44,9 @@ spec:
when:
- simple: "${header[Content-Type]} == 'application/json'"
steps:
+ - set-property:
+ name: deserialized
+ constant: "true"
- unmarshal:
json:
library: Jackson
@@ -58,10 +61,14 @@ spec:
name: "renames"
constant: "{{renames}}"
- bean: "org.apache.camel.kamelets.utils.transform.ReplaceField"
- - 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] 03/03: Regen
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch replace-action-261
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 83d7f4e20fb672eb8248840c90f4500b74484022
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon May 10 15:24:14 2021 +0200
Regen
---
docs/modules/ROOT/nav.adoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 7298777..69c83bd 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -46,7 +46,7 @@
* xref:ROOT:infinispan-source.adoc[image:kamelets/infinispan-source.svg[] Infinispan Source]
* xref:ROOT:insert-field-action.adoc[image:kamelets/insert-field-action.svg[] Insert Field Action]
* xref:ROOT:insert-header-action.adoc[image:kamelets/insert-header-action.svg[] Insert Header Action]
-* xref:ROOT:jira-source.adoc[image:kamelets/jira-source.svg[] Jira Source]<
+* xref:ROOT:jira-source.adoc[image:kamelets/jira-source.svg[] Jira Source]
* xref:ROOT:json-deserialize-action.adoc[image:kamelets/json-deserialize-action.svg[] Json Deserialize Action]
* xref:ROOT:json-serialize-action.adoc[image:kamelets/json-serialize-action.svg[] Json Serialize Action]
* xref:ROOT:kafka-not-secured-sink.adoc[image:kamelets/kafka-not-secured-sink.svg[] Kafka Not Secured Sink]
[camel-kamelets] 01/03: Replace 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 replace-action-261
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 682c6655c1d401a21a6a8731c0a31a67e5c37243
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon May 10 15:23:11 2021 +0200
Replace Field Action - Actions should not marshal into JSON if the input was not JSON
---
replace-field-action.kamelet.yaml | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/replace-field-action.kamelet.yaml b/replace-field-action.kamelet.yaml
index 61fd23e..c6f00b9 100644
--- a/replace-field-action.kamelet.yaml
+++ b/replace-field-action.kamelet.yaml
@@ -44,6 +44,9 @@ spec:
when:
- simple: "${header[Content-Type]} == 'application/json'"
steps:
+ - set-property:
+ name: deserialized
+ constant: "true"
- unmarshal:
json:
library: Jackson
@@ -58,10 +61,14 @@ spec:
name: "renames"
constant: "{{renames}}"
- bean: "org.apache.camel.kamelets.utils.transform.ReplaceField"
- - 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"