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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new b871533262c8 camel-mongodb-gridfs: three headers the producer sets are 
documented as consumer-only, and two read alike (#29961)
b871533262c8 is described below

commit b871533262c8ed3af5def6d341c0b326421a3454
Author: dhairya05 <[email protected]>
AuthorDate: Sun Nov 15 01:07:03 2026 +0530

    camel-mongodb-gridfs: three headers the producer sets are documented as 
consumer-only, and two read alike (#29961)
    
    …as consumer-only, and two read alike
    
    CamelFileContentType, CamelFileLength and CamelFileLastModified carry
    label="consumer", but the findOne producer operation sets all three:
    
        Object contentType = metadata.get(GRIDFS_FILE_KEY_CONTENT_TYPE);
        if (contentType != null) {
            exchange.getIn().setHeader(GridFsConstants.FILE_CONTENT_TYPE, 
contentType);
        }
        exchange.getIn().setHeader(GridFsConstants.FILE_LENGTH, 
file.getLength());
        exchange.getIn().setHeader(GridFsConstants.FILE_LAST_MODIFIED, 
file.getUploadDate());
    
    so the catalog files them under the consumer group and a producer route
    has nothing telling it findOne answers with them.
    
    Separately, Content-Type and CamelFileContentType both read "The content
    type of the file." while meaning opposite directions: the first is read
    by create to store the content type, the second is what findOne and the
    consumer hand back.
    
    Describe all four by what they do, and drop the consumer-only label from
    the three the producer sets, following FILE_NAME in the same class, which
    already documents both directions and carries no label.
---
 .../apache/camel/catalog/components/mongodb-gridfs.json  |  8 ++++----
 .../camel/component/mongodb/gridfs/mongodb-gridfs.json   |  8 ++++----
 .../camel/component/mongodb/gridfs/GridFsConstants.java  | 15 +++++++++++----
 .../endpoint/dsl/GridFsEndpointBuilderFactory.java       | 16 ++++++++++------
 4 files changed, 29 insertions(+), 18 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb-gridfs.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb-gridfs.json
index 1c5e8c49097b..7efbc7939e72 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb-gridfs.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb-gridfs.json
@@ -29,11 +29,11 @@
     "autowiredEnabled": { "index": 2, "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 t [...]
   },
   "headers": {
-    "CamelFileContentType": { "index": 0, "kind": "header", "displayName": "", 
"group": "consumer", "label": "consumer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The content type of the file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_CONTENT_TYPE" },
-    "CamelFileLength": { "index": 1, "kind": "header", "displayName": "", 
"group": "consumer", "label": "consumer", "required": false, "javaType": 
"long", "deprecated": false, "autowired": false, "secret": false, 
"description": "The size of the file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_LENGTH" },
-    "CamelFileLastModified": { "index": 2, "kind": "header", "displayName": 
"", "group": "consumer", "label": "consumer", "required": false, "javaType": 
"Date", "deprecated": false, "autowired": false, "secret": false, 
"description": "The upload date of the file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_LAST_MODIFIED" 
},
+    "CamelFileContentType": { "index": 0, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "autowired": false, "secret": false, "description": 
"(producer) The content type that findOne read from the metadata of the file. 
(consumer) The content type of the file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_CONTENT_TYPE" },
+    "CamelFileLength": { "index": 1, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "long", 
"deprecated": false, "autowired": false, "secret": false, "description": 
"(producer) The size of the file that findOne found. (consumer) The size of the 
file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_LENGTH" },
+    "CamelFileLastModified": { "index": 2, "kind": "header", "displayName": 
"", "group": "common", "label": "", "required": false, "javaType": "Date", 
"deprecated": false, "autowired": false, "secret": false, "description": 
"(producer) The upload date of the file that findOne found. (consumer) The 
upload date of the file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_LAST_MODIFIED" 
},
     "CamelFileName": { "index": 3, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "autowired": false, "secret": false, "description": 
"(producer) The name of the file: the name that create gives the file, and the 
file that findOne, remove, listAll and count look for. (consumer) The name of 
the file that was found.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_NAME" },
-    "Content-Type": { "index": 4, "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The content type of the file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#CONTENT_TYPE" },
+    "Content-Type": { "index": 4, "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The content type to store in the metadata of the file that 
create uploads.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#CONTENT_TYPE" },
     "CamelFileNameProduced": { "index": 5, "kind": "header", "displayName": 
"", "group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The file name produced.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_NAME_PRODUCED" 
},
     "CamelGridFsMetadata": { "index": 6, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "autowired": false, "secret": false, "description": "Any 
additional metadata stored along with the file in JSON format.", 
"constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_METADATA" },
     "CamelGridFsOperation": { "index": 7, "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The operation to perform.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_OPERATION" },
diff --git 
a/components/camel-mongodb-gridfs/src/generated/resources/META-INF/org/apache/camel/component/mongodb/gridfs/mongodb-gridfs.json
 
b/components/camel-mongodb-gridfs/src/generated/resources/META-INF/org/apache/camel/component/mongodb/gridfs/mongodb-gridfs.json
index 1c5e8c49097b..7efbc7939e72 100644
--- 
a/components/camel-mongodb-gridfs/src/generated/resources/META-INF/org/apache/camel/component/mongodb/gridfs/mongodb-gridfs.json
+++ 
b/components/camel-mongodb-gridfs/src/generated/resources/META-INF/org/apache/camel/component/mongodb/gridfs/mongodb-gridfs.json
@@ -29,11 +29,11 @@
     "autowiredEnabled": { "index": 2, "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 t [...]
   },
   "headers": {
-    "CamelFileContentType": { "index": 0, "kind": "header", "displayName": "", 
"group": "consumer", "label": "consumer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The content type of the file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_CONTENT_TYPE" },
-    "CamelFileLength": { "index": 1, "kind": "header", "displayName": "", 
"group": "consumer", "label": "consumer", "required": false, "javaType": 
"long", "deprecated": false, "autowired": false, "secret": false, 
"description": "The size of the file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_LENGTH" },
-    "CamelFileLastModified": { "index": 2, "kind": "header", "displayName": 
"", "group": "consumer", "label": "consumer", "required": false, "javaType": 
"Date", "deprecated": false, "autowired": false, "secret": false, 
"description": "The upload date of the file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_LAST_MODIFIED" 
},
+    "CamelFileContentType": { "index": 0, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "autowired": false, "secret": false, "description": 
"(producer) The content type that findOne read from the metadata of the file. 
(consumer) The content type of the file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_CONTENT_TYPE" },
+    "CamelFileLength": { "index": 1, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "long", 
"deprecated": false, "autowired": false, "secret": false, "description": 
"(producer) The size of the file that findOne found. (consumer) The size of the 
file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_LENGTH" },
+    "CamelFileLastModified": { "index": 2, "kind": "header", "displayName": 
"", "group": "common", "label": "", "required": false, "javaType": "Date", 
"deprecated": false, "autowired": false, "secret": false, "description": 
"(producer) The upload date of the file that findOne found. (consumer) The 
upload date of the file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_LAST_MODIFIED" 
},
     "CamelFileName": { "index": 3, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "autowired": false, "secret": false, "description": 
"(producer) The name of the file: the name that create gives the file, and the 
file that findOne, remove, listAll and count look for. (consumer) The name of 
the file that was found.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_NAME" },
-    "Content-Type": { "index": 4, "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The content type of the file.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#CONTENT_TYPE" },
+    "Content-Type": { "index": 4, "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The content type to store in the metadata of the file that 
create uploads.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#CONTENT_TYPE" },
     "CamelFileNameProduced": { "index": 5, "kind": "header", "displayName": 
"", "group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The file name produced.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_NAME_PRODUCED" 
},
     "CamelGridFsMetadata": { "index": 6, "kind": "header", "displayName": "", 
"group": "common", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "autowired": false, "secret": false, "description": "Any 
additional metadata stored along with the file in JSON format.", 
"constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_METADATA" },
     "CamelGridFsOperation": { "index": 7, "kind": "header", "displayName": "", 
"group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "autowired": false, "secret": false, 
"description": "The operation to perform.", "constantName": 
"org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_OPERATION" },
diff --git 
a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsConstants.java
 
b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsConstants.java
index da1d7121f1f2..adf363054a98 100644
--- 
a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsConstants.java
+++ 
b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsConstants.java
@@ -21,17 +21,24 @@ import org.apache.camel.spi.Metadata;
 
 public final class GridFsConstants {
 
-    @Metadata(label = "consumer", description = "The content type of the 
file.", javaType = "String")
+    @Metadata(description = "(producer) The content type that findOne read 
from the metadata of the file."
+                            + " (consumer) The content type of the file.",
+              javaType = "String")
     public static final String FILE_CONTENT_TYPE = Exchange.FILE_CONTENT_TYPE;
-    @Metadata(label = "consumer", description = "The size of the file.", 
javaType = "long")
+    @Metadata(description = "(producer) The size of the file that findOne 
found. (consumer) The size of the file.",
+              javaType = "long")
     public static final String FILE_LENGTH = Exchange.FILE_LENGTH;
-    @Metadata(label = "consumer", description = "The upload date of the 
file.", javaType = "Date")
+    @Metadata(description = "(producer) The upload date of the file that 
findOne found. (consumer) The upload date of"
+                            + " the file.",
+              javaType = "Date")
     public static final String FILE_LAST_MODIFIED = 
Exchange.FILE_LAST_MODIFIED;
     @Metadata(description = "(producer) The name of the file: the name that 
create gives the file, and the file that"
                             + " findOne, remove, listAll and count look for. 
(consumer) The name of the file that was found.",
               javaType = "String")
     public static final String FILE_NAME = Exchange.FILE_NAME;
-    @Metadata(label = "producer", description = "The content type of the 
file.", javaType = "String")
+    @Metadata(label = "producer",
+              description = "The content type to store in the metadata of the 
file that create uploads.",
+              javaType = "String")
     public static final String CONTENT_TYPE = Exchange.CONTENT_TYPE;
     @Metadata(label = "producer", description = "The file name produced.", 
javaType = "String")
     public static final String FILE_NAME_PRODUCED = 
Exchange.FILE_NAME_PRODUCED;
diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GridFsEndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GridFsEndpointBuilderFactory.java
index 6a162c465846..e906a04db4fd 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GridFsEndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GridFsEndpointBuilderFactory.java
@@ -818,11 +818,12 @@ public interface GridFsEndpointBuilderFactory {
         public static final GridFsHeaderNameBuilder INSTANCE = new 
GridFsHeaderNameBuilder();
 
         /**
-         * The content type of the file.
+         * (producer) The content type that findOne read from the metadata of
+         * the file. (consumer) The content type of the file.
          * 
          * The option is a: {@code String} type.
          * 
-         * Group: consumer
+         * Group: common
          * 
          * @return the name of the header {@code FileContentType}.
          */
@@ -830,11 +831,12 @@ public interface GridFsEndpointBuilderFactory {
             return "CamelFileContentType";
         }
         /**
-         * The size of the file.
+         * (producer) The size of the file that findOne found. (consumer) The
+         * size of the file.
          * 
          * The option is a: {@code long} type.
          * 
-         * Group: consumer
+         * Group: common
          * 
          * @return the name of the header {@code FileLength}.
          */
@@ -842,11 +844,12 @@ public interface GridFsEndpointBuilderFactory {
             return "CamelFileLength";
         }
         /**
+         * (producer) The upload date of the file that findOne found. 
(consumer)
          * The upload date of the file.
          * 
          * The option is a: {@code Date} type.
          * 
-         * Group: consumer
+         * Group: common
          * 
          * @return the name of the header {@code FileLastModified}.
          */
@@ -868,7 +871,8 @@ public interface GridFsEndpointBuilderFactory {
             return "CamelFileName";
         }
         /**
-         * The content type of the file.
+         * The content type to store in the metadata of the file that create
+         * uploads.
          * 
          * The option is a: {@code String} type.
          * 

Reply via email to