From aebd86d5abb431809988863d5b1b0a0f638a7fc1 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 23 Aug 2021 12:08:33 +0200 Subject: [PATCH 1/4] Insert Field Action documentation: Add more details --- insert-field-action.kamelet.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/insert-field-action.kamelet.yaml b/insert-field-action.kamelet.yaml index 26988c96c..a1ee831c0 100644 --- a/insert-field-action.kamelet.yaml +++ b/insert-field-action.kamelet.yaml @@ -13,7 +13,15 @@ metadata: spec: definition: title: "Insert Field Action" - description: "Adds a custom field with a constant value to the message in transit" + description: |- + + Adds a custom field with a constant value to the message in transit. + + This action works with Json Object. So it will expect a Json Array or a Json Object. + + If for example you have an array like '{ "foo":"John", "bar":30 }' and your action has been configured with field as 'element' and value as 'hello', you'll get '{ "foo":"John", "bar":30, "element":"hello" }' + + No headers mapping supported, only constant values. required: - field - value From 8c4c0613e1e5d9f574b42b5873c8ddc0e0672b0d Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 23 Aug 2021 12:09:23 +0200 Subject: [PATCH 2/4] Regen --- .../kamelets/insert-field-action.kamelet.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/library/camel-kamelets/src/main/resources/kamelets/insert-field-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/insert-field-action.kamelet.yaml index 26988c96c..a1ee831c0 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/insert-field-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/insert-field-action.kamelet.yaml @@ -13,7 +13,15 @@ metadata: spec: definition: title: "Insert Field Action" - description: "Adds a custom field with a constant value to the message in transit" + description: |- + + Adds a custom field with a constant value to the message in transit. + + This action works with Json Object. So it will expect a Json Array or a Json Object. + + If for example you have an array like '{ "foo":"John", "bar":30 }' and your action has been configured with field as 'element' and value as 'hello', you'll get '{ "foo":"John", "bar":30, "element":"hello" }' + + No headers mapping supported, only constant values. required: - field - value From 953501053148bbc3923dbfc7da362a93691715f5 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 23 Aug 2021 12:28:23 +0200 Subject: [PATCH 3/4] Regen --- insert-field-action.kamelet.yaml | 9 ++++----- .../resources/kamelets/insert-field-action.kamelet.yaml | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/insert-field-action.kamelet.yaml b/insert-field-action.kamelet.yaml index a1ee831c0..732c267d1 100644 --- a/insert-field-action.kamelet.yaml +++ b/insert-field-action.kamelet.yaml @@ -14,14 +14,13 @@ spec: definition: title: "Insert Field Action" description: |- + Adds a custom field with a constant value to the message in transit. - Adds a custom field with a constant value to the message in transit. + This action works with Json Object. So it will expect a Json Array or a Json Object. - This action works with Json Object. So it will expect a Json Array or a Json Object. + If for example you have an array like '{ "foo":"John", "bar":30 }' and your action has been configured with field as 'element' and value as 'hello', you'll get '{ "foo":"John", "bar":30, "element":"hello" }' - If for example you have an array like '{ "foo":"John", "bar":30 }' and your action has been configured with field as 'element' and value as 'hello', you'll get '{ "foo":"John", "bar":30, "element":"hello" }' - - No headers mapping supported, only constant values. + No headers mapping supported, only constant values. required: - field - value diff --git a/library/camel-kamelets/src/main/resources/kamelets/insert-field-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/insert-field-action.kamelet.yaml index a1ee831c0..732c267d1 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/insert-field-action.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/insert-field-action.kamelet.yaml @@ -14,14 +14,13 @@ spec: definition: title: "Insert Field Action" description: |- + Adds a custom field with a constant value to the message in transit. - Adds a custom field with a constant value to the message in transit. + This action works with Json Object. So it will expect a Json Array or a Json Object. - This action works with Json Object. So it will expect a Json Array or a Json Object. + If for example you have an array like '{ "foo":"John", "bar":30 }' and your action has been configured with field as 'element' and value as 'hello', you'll get '{ "foo":"John", "bar":30, "element":"hello" }' - If for example you have an array like '{ "foo":"John", "bar":30 }' and your action has been configured with field as 'element' and value as 'hello', you'll get '{ "foo":"John", "bar":30, "element":"hello" }' - - No headers mapping supported, only constant values. + No headers mapping supported, only constant values. required: - field - value From 7bae049fe5c21dbf88f62544452eb9db559808c3 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 23 Aug 2021 12:28:42 +0200 Subject: [PATCH 4/4] Regen docs --- docs/modules/ROOT/pages/insert-field-action.adoc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/insert-field-action.adoc b/docs/modules/ROOT/pages/insert-field-action.adoc index 21216aa4b..64d80aef8 100644 --- a/docs/modules/ROOT/pages/insert-field-action.adoc +++ b/docs/modules/ROOT/pages/insert-field-action.adoc @@ -5,7 +5,13 @@ *Support Level for this Kamelet is: "Preview"* -Adds a custom field with a constant value to the message in transit +Adds a custom field with a constant value to the message in transit. + +This action works with Json Object. So it will expect a Json Array or a Json Object. + +If for example you have an array like '{ "foo":"John", "bar":30 }' and your action has been configured with field as 'element' and value as 'hello', you'll get '{ "foo":"John", "bar":30, "element":"hello" }' + +No headers mapping supported, only constant values. == Configuration Options