Dhairya-007 opened a new pull request, #29968:
URL: https://github.com/apache/camel/pull/29968
## Problem
```java
@Metadata(label = "from both", description = "The metadata to associate with
the file.",
javaType = "Map<String, String>")
public static final String METADATA = HEADER_PREFIX + "Metadata";
```
`label` is a comma-separated set of group tokens, not a note, so "from both"
became a group. In `azure-storage-datalake.json` the header is filed under it,
alone:
```
5 producer CamelAzureStorageDataLakeFileName
6 from both CamelAzureStorageDataLakeMetadata
7 producer CamelAzureStorageDataLakePublicAccessType
8 consumer CamelAzureStorageDataLakeRawHttpHeaders
```
It is the only such group in the component - the other 62 headers in the
same class use `producer` (37) or `consumer` (25) - so the header table grows a
one-row section whose heading is a half-sentence.
The intent is right: the header is used in both directions.
`DataLakeExchangeHeaders` writes it from the file properties,
```java
public DataLakeExchangeHeaders metadata(final Map<String, String> metadata) {
headers.put(DataLakeConstants.METADATA, metadata);
return this;
}
```
and reads it back for the request options,
```java
public static Map<String, String> getMedataFromHeaders(final Exchange
exchange) {
return getObjectFromHeaders(exchange, DataLakeConstants.METADATA,
Map.class);
}
```
which `DataLakeFileOperations` passes on as
`commonRequestOptions.getMetadata()`.
In Camel a header used both ways carries no label - it then lands in the
`common` group - and names both directions in its description, the way
`GridFsConstants.FILE_NAME` does.
## Fix
Drop the label and put both directions in the description. The header now
appears under `common` instead of `from both`, and the description says what it
means in each direction.
The regenerated `azure-storage-datalake.json` files are included; header
entries keep their declaration order, so only this one line changes.
--
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]