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 2918e056ceb2912d3ba15e015b4a583cfee0c1e4
Author: Nicolas Filotto <[email protected]>
AuthorDate: Tue Mar 29 18:36:33 2022 +0200

    CAMEL-17792: Add doc about the message headers of camel-iota
---
 .../generated/resources/org/apache/camel/component/iota/iota.json | 8 ++++++++
 components/camel-iota/src/main/docs/iota-component.adoc           | 4 +++-
 .../main/java/org/apache/camel/component/iota/IOTAConstants.java  | 7 +++++++
 .../main/java/org/apache/camel/component/iota/IOTAEndpoint.java   | 2 +-
 4 files changed, 19 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-iota/src/generated/resources/org/apache/camel/component/iota/iota.json
 
b/components/camel-iota/src/generated/resources/org/apache/camel/component/iota/iota.json
index 0aa44bb..38c7320 100644
--- 
a/components/camel-iota/src/generated/resources/org/apache/camel/component/iota/iota.json
+++ 
b/components/camel-iota/src/generated/resources/org/apache/camel/component/iota/iota.json
@@ -25,6 +25,14 @@
     "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start 
Producer", "group": "producer", "label": "producer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Whether the producer 
should be started lazy (on the first message). By starting lazy you can use 
this to allow CamelContext and routes to startup in situations where a producer 
may otherwise fail during star [...]
     "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 [...]
   },
+  "headers": {
+    "CamelIOTASeed": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The tryte-encoded seed." },
+    "CamelIOTAValue": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "Integer", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The value to transfer" },
+    "CamelIOTAToAddress": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The address of the recipient" },
+    "CamelIOTAAddressIndex": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "Integer", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The key index to start search from" },
+    "CamelIOTAAddressStartIndex": { "kind": "header", "displayName": "", 
"group": "producer", "label": "", "required": false, "javaType": "Integer", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The starting key index, must be at least 0." },
+    "CamelIOTAAddressEndIndex": { "kind": "header", "displayName": "", 
"group": "producer", "label": "", "required": false, "javaType": "Integer", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The ending key index, must be bigger then start" }
+  },
   "properties": {
     "name": { "kind": "path", "displayName": "Name", "group": "producer", 
"label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "Component name" },
     "depth": { "kind": "parameter", "displayName": "Depth", "group": 
"producer", "label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "9", "description": "The depth determines how deep the tangle 
is analysed for getting Tips" },
diff --git a/components/camel-iota/src/main/docs/iota-component.adoc 
b/components/camel-iota/src/main/docs/iota-component.adoc
index b7adc79..fed2c4b 100644
--- a/components/camel-iota/src/main/docs/iota-component.adoc
+++ b/components/camel-iota/src/main/docs/iota-component.adoc
@@ -41,7 +41,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
 
 == Examples
 
diff --git 
a/components/camel-iota/src/main/java/org/apache/camel/component/iota/IOTAConstants.java
 
b/components/camel-iota/src/main/java/org/apache/camel/component/iota/IOTAConstants.java
index 688dc6d..f9dfea3 100644
--- 
a/components/camel-iota/src/main/java/org/apache/camel/component/iota/IOTAConstants.java
+++ 
b/components/camel-iota/src/main/java/org/apache/camel/component/iota/IOTAConstants.java
@@ -16,15 +16,22 @@
  */
 package org.apache.camel.component.iota;
 
+import org.apache.camel.spi.Metadata;
 import org.iota.jota.utils.Constants;
 
 public final class IOTAConstants {
 
+    @Metadata(description = "The tryte-encoded seed.", javaType = "String")
     public static final String SEED_HEADER = "CamelIOTASeed";
+    @Metadata(description = "The value to transfer", javaType = "Integer")
     public static final String VALUE_HEADER = "CamelIOTAValue";
+    @Metadata(description = "The address of the recipient", javaType = 
"String")
     public static final String TO_ADDRESS_HEADER = "CamelIOTAToAddress";
+    @Metadata(description = "The key index to start search from", javaType = 
"Integer")
     public static final String ADDRESS_INDEX_HEADER = "CamelIOTAAddressIndex";
+    @Metadata(description = "The starting key index, must be at least 0.", 
javaType = "Integer")
     public static final String ADDRESS_START_INDEX_HEADER = 
"CamelIOTAAddressStartIndex";
+    @Metadata(description = "The ending key index, must be bigger then start", 
javaType = "Integer")
     public static final String ADDRESS_END_INDEX_HEADER = 
"CamelIOTAAddressEndIndex";
 
     protected static final int MIN_WEIGHT_MAGNITUDE = 14;
diff --git 
a/components/camel-iota/src/main/java/org/apache/camel/component/iota/IOTAEndpoint.java
 
b/components/camel-iota/src/main/java/org/apache/camel/component/iota/IOTAEndpoint.java
index 8e8140b..fbb1255 100644
--- 
a/components/camel-iota/src/main/java/org/apache/camel/component/iota/IOTAEndpoint.java
+++ 
b/components/camel-iota/src/main/java/org/apache/camel/component/iota/IOTAEndpoint.java
@@ -33,7 +33,7 @@ import org.iota.jota.IotaAPI;
  * Manage financial transactions using IOTA distributed ledger.
  */
 @UriEndpoint(firstVersion = "2.23.0", scheme = "iota", title = "IOTA", syntax 
= "iota:name",
-             category = { Category.LEDGER, Category.API }, producerOnly = true)
+             category = { Category.LEDGER, Category.API }, producerOnly = 
true, headersClass = IOTAConstants.class)
 public class IOTAEndpoint extends DefaultEndpoint {
 
     private volatile IotaAPI apiClient;

Reply via email to