gnodet opened a new pull request, #26506: URL: https://github.com/apache/camel/pull/26506
Follow-up to #26451 (items 1-7, already merged). Fixes the five additional metadata mismatches reported by Claus in the CAMEL-24748 comments (found while working on CAMEL-24710 / PR #26494). ## Items fixed **8. olingo2 / olingo4 — syntax is `apiName/methodName`, runtime reads `methodName/resourcePath`** `Olingo2Endpoint` (and `Olingo4Endpoint`) declared `syntax = "olingo2:apiName/methodName"` with `apiName` a required enum of one value (`DEFAULT`). The runtime always strips an optional `DEFAULT/` prefix and reads the first path segment as the method name. The catalog therefore reported `Invalid enum value 'create' for option 'apiName'` on every documented example like `olingo2://create/Manufacturers`. Fix: change `syntax` to `"olingo2:methodName"` and `apiSyntax` to `"methodName"`. The `apiName` field is made non-required with `defaultValue=DEFAULT`. **9. xmpp — port is required in the metadata, the runtime defaults it** `XmppEndpoint.port` was annotated `@UriPath @Metadata(required = true)` but `XmppComponent.createEndpoint` parses the URI with `java.net.URI` and tolerates a missing port (returns -1). The documented examples write `xmpp://[email protected]/[email protected]` with no port. Fix: remove `@Metadata(required = true)` from the `port` field. **10. huggingface — task is an enum in the metadata, the runtime takes any name with `predictorBean`** `HuggingFaceConfiguration.task` was typed `HuggingFaceTask` (enum) with the enum values listed in `@Metadata(enums=...)`, so the catalog rejected any task name not in the list. `HuggingFaceComponent.createEndpoint` already catches `IllegalArgumentException` from `HuggingFaceTask.valueOf()` and allows any name when `predictorBean` is set. Fix: change the `task` field type to `String`; move the enum validation (when no `predictorBean`) to the component; adapt `TaskPredictorFactory` to convert the String back to the enum. The catalog now sees `type: string` with no enum constraint. **11. salesforce — `approval.*` options have no `@UriParam`** `SalesforceEndpointConfig.approval` (`ApprovalRequest`) had no `@UriParam` annotation. The salesforce-rest-api page documents `approval.actionType`, `approval.comments`, `approval.processDefinitionNameOrId`, `approval.skipEntryCriteria` as endpoint options bound by nested property binding, but the catalog called them unknown. Fix: add `@UriParam(label = "producer", description = "...")` to the `approval` field. **12. jt400 — the syntax has a literal `QSYS.LIB` segment the catalog reads as an option** `Jt400Endpoint` declared `syntax = "jt400:userID:password@systemName/QSYS.LIB/objectPath.type"`. The catalog parsed `QSYS.LIB` as an option name and reported `Unknown option 'QSYS.LIB'` on every example. The `objectPath` field in the configuration already stores the full path including `QSYS.LIB`. Fix: remove the literal `QSYS.LIB` segment — `syntax = "jt400:userID:password@systemName/objectPath.type"`. --- _Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_ -- 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]
