Dhairya-007 opened a new pull request, #30107:
URL: https://github.com/apache/camel/pull/30107
## Problem
The operation header names its enum by simple name only:
```java
javaType = "WatsonxAiOperations")
public static final String OPERATION = "CamelIBMWatsonxAiOperation";
```
`WatsonxAiOperations` is
`org.apache.camel.component.ibm.watsonx.ai.WatsonxAiOperations`, the
component's own enum.
Because the short name does not resolve, the header loses its value list:
the generator derives an `enum` from a resolved enum class, so the catalog
published no accepted values for the one header that decides what the producer
does.
```json
"CamelIBMWatsonxAiOperation": { ..., "javaType": "WatsonxAiOperations", ... }
```
The matching `operation` URI option has always listed all 33, because its
field is typed. After qualifying the header's `javaType` the two agree:
```
operation option : 33 values
operation header : 33 values (was none)
```
This is the worst case of the gap I have found: 33 operations, with names
like `textExtractionUploadAndFetch`, `textClassificationDeleteRequest` and
`processToolCalls` that nobody will guess, and the header is the only way to
vary the operation per exchange. A wrong value is not reported either - the
conversion yields `null` and the producer falls back to the configured
operation.
Fully qualified is the convention by a wide margin across the catalog: 3692
header `javaType` values are fully qualified or a built-in type, and 151 are
not.
## Fix
Qualify it to
`org.apache.camel.component.ibm.watsonx.ai.WatsonxAiOperations`, the FQN the
component's own sources import. The header name is untouched.
Metadata only - no behaviour change. I diffed the regenerated catalog file
against `main`: the only differences are this `javaType` and the `enum` list
appearing beside it.
--
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]