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 9fca5569f8a48e00d859d73014dd7dc936f28231 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Thu May 6 18:46:02 2021 +0200 Replace Field: Set JsonNode as expected input and output --- replace-field-action.kamelet.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/replace-field-action.kamelet.yaml b/replace-field-action.kamelet.yaml index 77fd0c7..03fabe8 100644 --- a/replace-field-action.kamelet.yaml +++ b/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"