gnodet-bot commented on code in PR #30602:
URL: https://github.com/apache/camel/pull/30602#discussion_r4658682783
##########
components/camel-alibaba/camel-alibaba-oss/src/main/java/org/apache/camel/component/alibaba/oss/constants/OSSHeaders.java:
##########
@@ -23,13 +23,18 @@
* Constants for the exchange headers when consuming objects
*/
public final class OSSHeaders {
- @Metadata(label = "consumer", description = "Name of the bucket where
object is contained", javaType = "String")
+ @Metadata(label = "consumer", description = "The name of the bucket. The
consumer sets it for a consumed object, and the"
+ + " producer for getObject. An
exchange property of the same name replaces the"
+ + " bucketName option for the
producer, and this header replaces both.",
+ javaType = "String")
Review Comment:
⚠️ **Label mismatch:** The description now correctly states that the
producer also sets this header (for `getObject`), but `label = "consumer"` is
unchanged. The catalog generator uses the label to place headers in the
consumer vs. producer sections — users browsing the producer documentation will
not see `CamelAlibabaOssBucketName` listed.
Change to `label = "consumer,producer"`:
```suggestion
@Metadata(label = "consumer,producer", description = "The name of the
bucket. The consumer sets it for a consumed object, and the"
+ " producer for getObject.
An exchange property of the same name replaces the"
+ " bucketName option for
the producer, and this header replaces both.",
javaType = "String")
```
##########
components/camel-alibaba/camel-alibaba-oss/src/main/java/org/apache/camel/component/alibaba/oss/constants/OSSHeaders.java:
##########
@@ -39,7 +44,8 @@ public final class OSSHeaders {
public static final String CONTENT_LENGTH = "CamelAlibabaOssContentLength";
@Metadata(label = "consumer", description = "The type of content stored in
the object", javaType = "String")
public static final String CONTENT_TYPE = "CamelAlibabaOssContentType";
- @Metadata(label = "consumer", description = "Name of the object with which
the operation is to be performed",
+ @Metadata(label = "consumer", description = "The name of the object. The
consumer sets it for a consumed object, and the"
+ + " producer for getObject.",
Review Comment:
⚠️ **Label mismatch:** Same issue as `BUCKET_NAME` above — the description
says the producer sets this header for `getObject`, but `label = "consumer"` is
unchanged.
```suggestion
@Metadata(label = "consumer,producer", description = "The name of the
object. The consumer sets it for a consumed object, and the"
+ " producer for getObject.",
```
##########
components/camel-alibaba/camel-alibaba-oss/src/main/java/org/apache/camel/component/alibaba/oss/OSSEndpoint.java:
##########
@@ -68,51 +68,78 @@
+ " listObjects and
listBuckets a List of a Map per object or bucket"))
public class OSSEndpoint extends ScheduledPollEndpoint {
- @UriPath(description = "Name of bucket to perform operation on",
displayName = "Bucket Name")
+ @UriPath(description = "The name of the bucket, or of the destination
bucket for copyObject. The CamelAlibabaOssBucketName"
+ + " exchange property replaces this option for the
producer, and a header of the same name replaces"
+ + " both.",
+ displayName = "Bucket Name")
private String bucketName;
- @UriParam(description = "Operation to be performed", displayName =
"Operation", label = "producer",
+ @UriParam(description = "The operation that the producer performs. The
CamelAlibabaOssOperation exchange property replaces"
+ + " this option, and a header of the same name
replaces both.",
+ displayName = "Operation", label = "producer",
enums =
"listBuckets,listObjects,putObject,getObject,deleteObject,copyObject,headObject")
private String operation;
- @UriParam(description = "OSS service region", displayName = "Service
region")
+ @UriParam(description = "The region ID of Object Storage Service, for
example cn-hangzhou. The SDK uses it to sign"
+ + " requests, and to build the endpoint when the
endpoint option is not set.",
+ displayName = "Service region")
@Metadata(required = true)
private String region;
- @UriParam(description = "OSS endpoint URL. Carries higher precedence than
region based client initialization",
+ @UriParam(description = "The endpoint of Object Storage Service, for
example oss-cn-hangzhou.aliyuncs.com. If not set, the"
+ + " SDK builds it from the region option.",
displayName = "Endpoint url")
private String endpoint;
- @UriParam(description = "Configuration object for cloud service
authentication", displayName = "Service Configuration",
+ @UriParam(description = "The AccessKey pair as an
org.apache.camel.component.alibaba.common.models.ServiceKeys. Its"
+ + " accessKey and its secretKey are each used when
the option of the same name is not set.",
+ displayName = "Service Configuration",
security = "secret", label = "security")
private ServiceKeys serviceKeys;
- @UriParam(description = "Access key for the cloud user", displayName =
"API access key (AK)", security = "secret",
+ @UriParam(description = "The AccessKey ID of the AccessKey pair for Object
Storage Service. If not set, the accessKey of"
+ + " the serviceKeys option is used.",
+ displayName = "API access key (AK)", security = "secret",
label = "security")
@Metadata(required = true)
private String accessKey;
- @UriParam(description = "Secret key for the cloud user", displayName =
"API secret key (SK)", security = "secret",
+ @UriParam(description = "The AccessKey secret of the AccessKey pair for
Object Storage Service. If not set, the secretKey"
+ + " of the serviceKeys option is used.",
+ displayName = "API secret key (SK)", security = "secret",
label = "security")
@Metadata(required = true)
private String secretKey;
- @UriParam(description = "Name of object to perform operation with",
displayName = "Object Name")
+ @UriParam(description = "The name of the object for the producer, or of
the destination object for copyObject. The"
+ + " CamelAlibabaOssObjectName exchange property
replaces this option, and a header of the same name"
+ + " replaces both.",
+ displayName = "Object Name")
private String objectName;
- @UriParam(description = "The object name prefix used for filtering objects
to be listed", displayName = "Prefix",
+ @UriParam(description = "The prefix of the names of the objects to list,
for the consumer and for listObjects. The"
+ + " CamelAlibabaOssPrefix exchange property
replaces this option for the producer, and a header of"
+ + " the same name replaces both.",
Review Comment:
⚠️ **Label mismatch:** The description says `"for the consumer and for
listObjects"` and explicitly documents the exchange property replacing this
option `"for the producer"` — but `label = "consumer"` on the next line is
unchanged. `listObjects` is a producer operation. Change `label` to
`"consumer,producer"`.
```suggestion
@UriParam(description = "The prefix of the names of the objects to list,
for the consumer and for listObjects. The"
+ " CamelAlibabaOssPrefix exchange property
replaces this option for the producer, and a header of"
+ " the same name replaces both.",
displayName = "Prefix",
label = "consumer,producer")
```
##########
components/camel-alibaba/camel-alibaba-oss/src/main/java/org/apache/camel/component/alibaba/oss/OSSEndpoint.java:
##########
@@ -68,51 +68,78 @@
+ " listObjects and
listBuckets a List of a Map per object or bucket"))
public class OSSEndpoint extends ScheduledPollEndpoint {
- @UriPath(description = "Name of bucket to perform operation on",
displayName = "Bucket Name")
+ @UriPath(description = "The name of the bucket, or of the destination
bucket for copyObject. The CamelAlibabaOssBucketName"
+ + " exchange property replaces this option for the
producer, and a header of the same name replaces"
+ + " both.",
+ displayName = "Bucket Name")
private String bucketName;
- @UriParam(description = "Operation to be performed", displayName =
"Operation", label = "producer",
+ @UriParam(description = "The operation that the producer performs. The
CamelAlibabaOssOperation exchange property replaces"
+ + " this option, and a header of the same name
replaces both.",
+ displayName = "Operation", label = "producer",
enums =
"listBuckets,listObjects,putObject,getObject,deleteObject,copyObject,headObject")
private String operation;
- @UriParam(description = "OSS service region", displayName = "Service
region")
+ @UriParam(description = "The region ID of Object Storage Service, for
example cn-hangzhou. The SDK uses it to sign"
+ + " requests, and to build the endpoint when the
endpoint option is not set.",
+ displayName = "Service region")
@Metadata(required = true)
private String region;
- @UriParam(description = "OSS endpoint URL. Carries higher precedence than
region based client initialization",
+ @UriParam(description = "The endpoint of Object Storage Service, for
example oss-cn-hangzhou.aliyuncs.com. If not set, the"
+ + " SDK builds it from the region option.",
displayName = "Endpoint url")
private String endpoint;
- @UriParam(description = "Configuration object for cloud service
authentication", displayName = "Service Configuration",
+ @UriParam(description = "The AccessKey pair as an
org.apache.camel.component.alibaba.common.models.ServiceKeys. Its"
+ + " accessKey and its secretKey are each used when
the option of the same name is not set.",
Review Comment:
💡 **Passive voice (low):** `"Its accessKey and its secretKey are each used
when the option of the same name is not set."` — passive construction. Active
rewrite:
```suggestion
@UriParam(description = "The AccessKey pair as an
org.apache.camel.component.alibaba.common.models.ServiceKeys. If the accessKey
option is not set, the endpoint uses the accessKey of this pair. The same
applies to secretKey.",
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]