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 c5722389030415457a565fbfcb1efd2d945be035
Author: Nicolas Filotto <[email protected]>
AuthorDate: Thu Mar 31 16:08:12 2022 +0200

    CAMEL-17792: Add doc about the message headers of camel-minio
---
 .../org/apache/camel/component/minio/minio.json    |  23 +++++
 .../camel-minio/src/main/docs/minio-component.adoc | 107 +--------------------
 .../camel/component/minio/MinioConstants.java      |  73 ++++++++++++++
 .../camel/component/minio/MinioEndpoint.java       |   2 +-
 4 files changed, 100 insertions(+), 105 deletions(-)

diff --git 
a/components/camel-minio/src/generated/resources/org/apache/camel/component/minio/minio.json
 
b/components/camel-minio/src/generated/resources/org/apache/camel/component/minio/minio.json
index 28ad0cc..16b776c 100644
--- 
a/components/camel-minio/src/generated/resources/org/apache/camel/component/minio/minio.json
+++ 
b/components/camel-minio/src/generated/resources/org/apache/camel/component/minio/minio.json
@@ -70,6 +70,29 @@
     "accessKey": { "kind": "property", "displayName": "Access Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.minio.MinioConfiguration", "configurationField": 
"configuration", "description": "Amazon AWS Secret Access Key or Minio Access 
Key. If not set camel will connect to service for anonymous access." },
     "secretKey": { "kind": "property", "displayName": "Secret Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.minio.MinioConfiguration", "configurationField": 
"configuration", "description": "Amazon AWS Access Key Id or Minio Secret Key. 
If not set camel will connect to service for anonymous access." }
   },
+  "headers": {
+    "CamelMinioBucketName": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "*Producer:* The bucket Name which this object will be stored or 
which will be used for the current operation. *Consumer:* The name of the 
bucket in which this object is contained." },
+    "CamelMinioDestinationBucketName": { "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "deprecationNote": "", "autowired": false, 
"secret": false, "description": "The bucket Destination Name which will be used 
for the current operation." },
+    "CamelMinioContentControl": { "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "*Producer:* The content control of this object. 
*Consumer:* The *optional* Cache-Control HTTP header which allows the user 
to\nspecify caching behavior along the HTTP request\/reply chain." },
+    "CamelMinioContentDisposition": { "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "*Producer:* The content disposition of this object. 
*Consumer:* The *optional* Content-Disposition HTTP header, which 
specifies\npresentational information such as the recommended filename for 
the\nobject to be saved as." },
+    "CamelMinioContentEncoding": { "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "*Producer:* The content encoding of this object. 
*Consumer:* The *optional* Content-Encoding HTTP header specifying what 
content\nencodings have been applied to the object and what decoding 
mechanisms\nmust be applied in order to obtain the media-typ [...]
+    "CamelMinioContentLength": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "Long", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "*Producer:* The content length of this object. *Consumer:* The 
Content-Length HTTP header indicating the size of the associated\nobject in 
bytes." },
+    "CamelMinioContentMD5": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "*Producer:* The md5 checksum of this object. *Consumer:* The 
base64 encoded 128-bit MD5 digest of the associated object (content\n- not 
including headers) according to RFC 1864. This data is used as a\nmessage 
integrity check to verify that the data recei [...]
+    "CamelMinioContentType": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "*Producer:* The content type of this object. *Consumer:* The 
Content-Type HTTP header, which indicates the type of content stored\nin the 
associated object. The value of this header is a standard MIME\ntype." },
+    "CamelMinioETag": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "*Producer:* The ETag value for the newly uploaded object. 
*Consumer:* The hex encoded 128-bit MD5 digest of the associated object 
according to\nRFC 1864. This data is used as an integrity check to verify that 
the\ndata received by the caller is the same data th [...]
+    "CamelMinioObjectName": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "*Producer:* The key under which this object will be stored or 
which will be used for the current operation. *Consumer:* The key under which 
this object is stored." },
+    "CamelMinioDestinationObjectName": { "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "deprecationNote": "", "autowired": false, 
"secret": false, "description": "The Destination key which will be used for the 
current operation." },
+    "CamelMinioLastModified": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "java.util.Date", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "*Producer:* The last modified timestamp of this object. 
*Consumer:* The value of the Last-Modified header, indicating the date and time 
at\nwhich Minio last recorded a modification to the associated object." },
+    "CamelMinioStorageClass": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The storage class of this object." },
+    "CamelMinioVersionId": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "*Producer:* The version Id of the object to be stored or 
returned from the current operation. *Consumer:* The version ID of the 
associated Minio object if available. Version\nIDs are only assigned to objects 
when an object is uploaded to an Minio bucket th [...]
+    "CamelMinioCannedAcl": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The canned acl that will be applied to the object. 
see\n`com.amazonaws.services.s3.model.CannedAccessControlList` for 
allowed\nvalues." },
+    "CamelMinioOperation": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": 
"org.apache.camel.component.minio.MinioOperations", "enum": [ "copyObject", 
"listObjects", "deleteObject", "deleteObjects", "deleteBucket", "listBuckets", 
"getObject", "getPartialObject" ], "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "description": "The operation to perform." 
},
+    "CamelMinioServerSideEncryption": { "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "*Producer:* Sets the server-side encryption algorithm 
when encrypting\nthe object using Minio-managed keys. For example use AES256. 
*Consumer:* The server-side encryption algorithm when encrypting the\nobject 
using Minio-managed keys." },
+    "CamelMinioExpirationTime": { "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The expiration time" },
+    "CamelMinioReplicationStatus": { "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The replication status" },
+    "CamelMinioOffset": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The offset" },
+    "CamelMinioLength": { "kind": "header", "displayName": "", "group": 
"producer", "label": "producer", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The length" }
+  },
   "properties": {
     "bucketName": { "kind": "path", "displayName": "Bucket Name", "group": 
"common", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.minio.MinioConfiguration", "configurationField": 
"configuration", "description": "Bucket name" },
     "autoCreateBucket": { "kind": "parameter", "displayName": "Auto Create 
Bucket", "group": "common", "label": "common", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.minio.MinioConfiguration", "configurationField": 
"configuration", "description": "Setting the autocreation of the bucket if 
bucket name not exist." },
diff --git a/components/camel-minio/src/main/docs/minio-component.adoc 
b/components/camel-minio/src/main/docs/minio-component.adoc
index ae09e0f..325c157 100644
--- a/components/camel-minio/src/main/docs/minio-component.adoc
+++ b/components/camel-minio/src/main/docs/minio-component.adoc
@@ -67,110 +67,9 @@ aggregate this number of messages.
 
 == Usage
 
-=== Message headers evaluated by the Minio producer
-
-[width="100%",cols="10%,10%,80%",options="header"]
-|=======================================================================
-|Header |Type |Description
-
-|`CamelMinioBucketName` |`String` |The bucket Name which this object will be 
stored or which will be used for the current operation
-
-|`CamelMinioDestinationBucketName` |`String` |The bucket Destination Name 
which will be used for the current operation
-
-|`CamelMinioContentLength` |`Long` |The content length of this object.
-
-|`CamelMinioContentType` |`String` |The content type of this object.
-
-|`CamelMinioContentControl` |`String` |The content control of this object.
-
-|`CamelMinioContentDisposition` |`String` |The content disposition of this 
object.
-
-|`CamelMinioContentEncoding` |`String` |The content encoding of this object.
-
-|`CamelMinioContentMD5` |`String` |The md5 checksum of this object.
-
-|`CamelMinioDestinationObjectName` |`String` |The Destination key which will 
be used for the current operation
-
-|`CamelMinioObjectName` |`String` |The key under which this object will be 
stored or which will be used for the current operation
-
-|`CamelMinioLastModified` |`java.util.Date` |The last modified timestamp of 
this object.
-
-|`CamelMinioOperation` |`String` |The operation to perform. Permitted values 
are copyObject, deleteObject, deleteObjects, listBuckets, deleteBucket, 
downloadLink, listObjects
-
-|`CamelMinioStorageClass` |`String` |The storage class of this object.
-
-|`CamelMinioCannedAcl` |`String` |The canned acl that will be applied to the 
object. see
-`com.amazonaws.services.s3.model.CannedAccessControlList` for allowed
-values.
-
-//|`CamelMinioHeaders` |`Map<String,String>` |Support to get or set custom 
objectMetadata headers.
-
-|`CamelMinioServerSideEncryption` |String |Sets the server-side encryption 
algorithm when encrypting
-the object using Minio-managed keys. For example use AES256.
-
-|`CamelMinioVersionId` |`String` |The version Id of the object to be stored or 
returned from the current operation
-|=======================================================================
-
-=== Message headers set by the Minio producer
-
-[width="100%",cols="10%,10%,80%",options="header",]
-|=======================================================================
-|Header |Type |Description
-|`CamelMinioETag` |`String` |The ETag value for the newly uploaded object.
-
-|`CamelMinioVersionId` |`String` |The *optional* version ID of the newly 
uploaded object.
-
-//|`CamelMinioDownloadLinkExpiration` | `String` | The expiration (millis) of 
URL download link. The link will be stored into *CamelMinioDownloadLink* 
response header.
-
-|=======================================================================
-
-=== Message headers set by the Minio consumer
-
-[width="100%",cols="10%,10%,80%",options="header",]
-|=======================================================================
-|Header |Type |Description
-
-|`CamelMinioObjectName` |`String` |The key under which this object is stored.
-
-|`CamelMinioBucketName` |`String` |The name of the bucket in which this object 
is contained.
-
-|`CamelMinioETag` |`String` |The hex encoded 128-bit MD5 digest of the 
associated object according to
-RFC 1864. This data is used as an integrity check to verify that the
-data received by the caller is the same data that was sent by Minio
-
-|`CamelMinioLastModified` |`Date` |The value of the Last-Modified header, 
indicating the date and time at
-which Minio last recorded a modification to the associated object.
-
-|`CamelMinioVersionId` |`String` |The version ID of the associated Minio 
object if available. Version
-IDs are only assigned to objects when an object is uploaded to an Minio bucket 
that has object versioning enabled.
-
-|`CamelMinioContentType` |`String` |The Content-Type HTTP header, which 
indicates the type of content stored
-in the associated object. The value of this header is a standard MIME
-type.
-
-|`CamelMinioContentMD5` |`String` |The base64 encoded 128-bit MD5 digest of 
the associated object (content
-- not including headers) according to RFC 1864. This data is used as a
-message integrity check to verify that the data received by Minio is
-the same data that the caller sent.
-
-|`CamelMinioContentLength` |`Long` |The Content-Length HTTP header indicating 
the size of the associated
-object in bytes.
-
-|`CamelMinioContentEncoding` |`String` |The *optional* Content-Encoding HTTP 
header specifying what content
-encodings have been applied to the object and what decoding mechanisms
-must be applied in order to obtain the media-type referenced by the
-Content-Type field.
-
-|`CamelMinioContentDisposition` |`String` |The *optional* Content-Disposition 
HTTP header, which specifies
-presentational information such as the recommended filename for the
-object to be saved as.
-
-|`CamelMinioContentControl` |`String` |The *optional* Cache-Control HTTP 
header which allows the user to
-specify caching behavior along the HTTP request/reply chain.
-
-|`CamelMinioServerSideEncryption` |String |The server-side encryption 
algorithm when encrypting the
-object using Minio-managed keys.
-|=======================================================================
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 === Minio Producer operations
 
diff --git 
a/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioConstants.java
 
b/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioConstants.java
index a9e1673..545d17d 100644
--- 
a/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioConstants.java
+++ 
b/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioConstants.java
@@ -16,31 +16,104 @@
  */
 package org.apache.camel.component.minio;
 
+import org.apache.camel.spi.Metadata;
+
 /**
  * Constants used in Camel Minio module
  */
 public interface MinioConstants {
 
     int BYTE_ARRAY_LENGTH = 1024;
+    @Metadata(description = "*Producer:* The bucket Name which this object 
will be stored or which will be used for the current operation. "
+                            +
+                            "*Consumer:* The name of the bucket in which this 
object is contained.",
+              javaType = "String")
     String BUCKET_NAME = "CamelMinioBucketName";
+    @Metadata(label = "producer", description = "The bucket Destination Name 
which will be used for the current operation.",
+              javaType = "String")
     String DESTINATION_BUCKET_NAME = "CamelMinioDestinationBucketName";
+    @Metadata(description = "*Producer:* The content control of this object. " 
+
+                            "*Consumer:* The *optional* Cache-Control HTTP 
header which allows the user to\n" +
+                            "specify caching behavior along the HTTP 
request/reply chain.",
+              javaType = "String")
     String CACHE_CONTROL = "CamelMinioContentControl";
+    @Metadata(description = "*Producer:* The content disposition of this 
object. " +
+                            "*Consumer:* The *optional* Content-Disposition 
HTTP header, which specifies\n" +
+                            "presentational information such as the 
recommended filename for the\n" +
+                            "object to be saved as.",
+              javaType = "String")
     String CONTENT_DISPOSITION = "CamelMinioContentDisposition";
+    @Metadata(description = "*Producer:* The content encoding of this object. 
" +
+                            "*Consumer:* The *optional* Content-Encoding HTTP 
header specifying what content\n" +
+                            "encodings have been applied to the object and 
what decoding mechanisms\n" +
+                            "must be applied in order to obtain the media-type 
referenced by the\n" +
+                            "Content-Type field.",
+              javaType = "String")
     String CONTENT_ENCODING = "CamelMinioContentEncoding";
+    @Metadata(description = "*Producer:* The content length of this object. " +
+                            "*Consumer:* The Content-Length HTTP header 
indicating the size of the associated\n" +
+                            "object in bytes.",
+              javaType = "Long")
     String CONTENT_LENGTH = "CamelMinioContentLength";
+    @Metadata(description = "*Producer:* The md5 checksum of this object. " +
+                            "*Consumer:* The base64 encoded 128-bit MD5 digest 
of the associated object (content\n" +
+                            "- not including headers) according to RFC 1864. 
This data is used as a\n" +
+                            "message integrity check to verify that the data 
received by Minio is\n" +
+                            "the same data that the caller sent.",
+              javaType = "String")
     String CONTENT_MD5 = "CamelMinioContentMD5";
+    @Metadata(description = "*Producer:* The content type of this object. " +
+                            "*Consumer:* The Content-Type HTTP header, which 
indicates the type of content stored\n" +
+                            "in the associated object. The value of this 
header is a standard MIME\n" +
+                            "type.",
+              javaType = "String")
     String CONTENT_TYPE = "CamelMinioContentType";
+    @Metadata(description = "*Producer:* The ETag value for the newly uploaded 
object. " +
+                            "*Consumer:* The hex encoded 128-bit MD5 digest of 
the associated object according to\n" +
+                            "RFC 1864. This data is used as an integrity check 
to verify that the\n" +
+                            "data received by the caller is the same data that 
was sent by Minio",
+              javaType = "String")
     String E_TAG = "CamelMinioETag";
+    @Metadata(description = "*Producer:* The key under which this object will 
be stored or which will be used for the current operation. "
+                            +
+                            "*Consumer:* The key under which this object is 
stored.",
+              javaType = "String")
     String OBJECT_NAME = "CamelMinioObjectName";
+    @Metadata(label = "producer", description = "The Destination key which 
will be used for the current operation.",
+              javaType = "String")
     String DESTINATION_OBJECT_NAME = "CamelMinioDestinationObjectName";
+    @Metadata(description = "*Producer:* The last modified timestamp of this 
object. " +
+                            "*Consumer:* The value of the Last-Modified 
header, indicating the date and time at\n" +
+                            "which Minio last recorded a modification to the 
associated object.",
+              javaType = "java.util.Date")
     String LAST_MODIFIED = "CamelMinioLastModified";
+    @Metadata(label = "producer", description = "The storage class of this 
object.", javaType = "String")
     String STORAGE_CLASS = "CamelMinioStorageClass";
+    @Metadata(description = "*Producer:* The version Id of the object to be 
stored or returned from the current operation. " +
+                            "*Consumer:* The version ID of the associated 
Minio object if available. Version\n" +
+                            "IDs are only assigned to objects when an object 
is uploaded to an Minio bucket that has object versioning enabled.",
+              javaType = "String")
     String VERSION_ID = "CamelMinioVersionId";
+    @Metadata(label = "producer", description = "The canned acl that will be 
applied to the object. see\n" +
+                                                
"`com.amazonaws.services.s3.model.CannedAccessControlList` for allowed\n" +
+                                                "values.",
+              javaType = "String")
     String CANNED_ACL = "CamelMinioCannedAcl";
+    @Metadata(label = "producer", description = "The operation to perform.",
+              javaType = "org.apache.camel.component.minio.MinioOperations")
     String MINIO_OPERATION = "CamelMinioOperation";
+    @Metadata(description = "*Producer:* Sets the server-side encryption 
algorithm when encrypting\n" +
+                            "the object using Minio-managed keys. For example 
use AES256. " +
+                            "*Consumer:* The server-side encryption algorithm 
when encrypting the\n" +
+                            "object using Minio-managed keys.",
+              javaType = "String")
     String SERVER_SIDE_ENCRYPTION = "CamelMinioServerSideEncryption";
+    @Metadata(description = "The expiration time", javaType = "String")
     String EXPIRATION_TIME = "CamelMinioExpirationTime";
+    @Metadata(description = "The replication status", javaType = "String")
     String REPLICATION_STATUS = "CamelMinioReplicationStatus";
+    @Metadata(label = "producer", description = "The offset", javaType = 
"String")
     String OFFSET = "CamelMinioOffset";
+    @Metadata(label = "producer", description = "The length", javaType = 
"String")
     String LENGTH = "CamelMinioLength";
 }
diff --git 
a/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioEndpoint.java
 
b/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioEndpoint.java
index 3c01e8b..ed9417b 100644
--- 
a/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioEndpoint.java
+++ 
b/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioEndpoint.java
@@ -40,7 +40,7 @@ import static org.apache.camel.util.ObjectHelper.isNotEmpty;
  * Store and retrieve objects from Minio Storage Service using Minio SDK.
  */
 @UriEndpoint(firstVersion = "3.5.0", scheme = "minio", title = "Minio", syntax 
= "minio:bucketName",
-             category = { Category.CLOUD, Category.FILE })
+             category = { Category.CLOUD, Category.FILE }, headersClass = 
MinioConstants.class)
 public class MinioEndpoint extends ScheduledPollEndpoint {
 
     private static final Logger LOG = 
LoggerFactory.getLogger(MinioEndpoint.class);

Reply via email to