This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e541559953e4787b825695c49bc3c823861dd077
Author: Nicolas Filotto <[email protected]>
AuthorDate: Wed Mar 30 17:51:25 2022 +0200

    CAMEL-17792: Add doc about the message headers of camel-jolt
---
 .../generated/resources/org/apache/camel/component/jolt/jolt.json    | 4 ++++
 components/camel-jolt/src/main/docs/jolt-component.adoc              | 4 +++-
 .../src/main/java/org/apache/camel/component/jolt/JoltConstants.java | 5 ++++-
 .../src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java  | 2 +-
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git 
a/components/camel-jolt/src/generated/resources/org/apache/camel/component/jolt/jolt.json
 
b/components/camel-jolt/src/generated/resources/org/apache/camel/component/jolt/jolt.json
index 3d49095..d625262 100644
--- 
a/components/camel-jolt/src/generated/resources/org/apache/camel/component/jolt/jolt.json
+++ 
b/components/camel-jolt/src/generated/resources/org/apache/camel/component/jolt/jolt.json
@@ -27,6 +27,10 @@
     "autowiredEnabled": { "kind": "property", "displayName": "Autowired 
Enabled", "group": "advanced", "label": "advanced", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "description": "Whether autowiring is 
enabled. This is used for automatic autowiring options (the option must be 
marked as autowired) by looking up in the registry to find if there is a single 
instance of matching type, which t [...]
     "transform": { "kind": "property", "displayName": "Transform", "group": 
"advanced", "label": "advanced", "required": false, "type": "object", 
"javaType": "com.bazaarvoice.jolt.Transform", "deprecated": false, "autowired": 
false, "secret": false, "description": "Explicitly sets the Transform to use. 
If not set a Transform specified by the transformDsl will be created" }
   },
+  "headers": {
+    "CamelJoltResourceUri": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The resource URI" },
+    "CamelJoltContext": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "Map<String, Object>", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The context" }
+  },
   "properties": {
     "resourceUri": { "kind": "path", "displayName": "Resource Uri", "group": 
"producer", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "Path to the resource. You can prefix 
with: classpath, file, http, ref, or bean. classpath, file and http loads the 
resource using these protocols (classpath is default). ref will lookup the 
resource in the registry. bean will [...]
     "allowContextMapAll": { "kind": "parameter", "displayName": "Allow Context 
Map All", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Sets whether the 
context map should allow access to all details. By default only the message 
body and headers can be accessed. This option can be enabled for full access to 
the current Exchange and CamelContext. [...]
diff --git a/components/camel-jolt/src/main/docs/jolt-component.adoc 
b/components/camel-jolt/src/main/docs/jolt-component.adoc
index f9f4cea..ed61aa4 100644
--- a/components/camel-jolt/src/main/docs/jolt-component.adoc
+++ b/components/camel-jolt/src/main/docs/jolt-component.adoc
@@ -54,7 +54,9 @@ include::partial$component-endpoint-options.adoc[]
 // endpoint options: START
 
 // endpoint options: END
-
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Samples
 
diff --git 
a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltConstants.java
 
b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltConstants.java
index dafd8eb..da469cc 100644
--- 
a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltConstants.java
+++ 
b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltConstants.java
@@ -16,13 +16,16 @@
  */
 package org.apache.camel.component.jolt;
 
+import org.apache.camel.spi.Metadata;
+
 /**
  * Jolt Constants.
  */
 public final class JoltConstants {
 
+    @Metadata(description = "The resource URI", javaType = "String")
     public static final String JOLT_RESOURCE_URI = "CamelJoltResourceUri";
-
+    @Metadata(description = "The context", javaType = "Map<String, Object>")
     public static final String JOLT_CONTEXT = "CamelJoltContext";
 
     private JoltConstants() {
diff --git 
a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
 
b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
index 606768b..fee394c 100644
--- 
a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
+++ 
b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
@@ -41,7 +41,7 @@ import org.apache.camel.util.ObjectHelper;
  * JSON to JSON transformation using JOLT.
  */
 @UriEndpoint(firstVersion = "2.16.0", scheme = "jolt", title = "JOLT", syntax 
= "jolt:resourceUri", producerOnly = true,
-             category = { Category.TRANSFORMATION })
+             category = { Category.TRANSFORMATION }, headersClass = 
JoltConstants.class)
 public class JoltEndpoint extends ResourceEndpoint {
 
     private JoltTransform transform;

Reply via email to