Claus Ibsen created CAMEL-26161:
-----------------------------------
Summary: camel-zendesk - the documented syntax zendesk:methodName
fails endpoint creation, only zendesk:default/methodName works
Key: CAMEL-26161
URL: https://issues.apache.org/jira/browse/CAMEL-26161
Project: Camel
Issue Type: Bug
Components: camel-zendesk
Reporter: Claus Ibsen
Fix For: 4.24.0
Found while adding the catalog body types of zendesk (CAMEL-24961, PR #28410).
h4. 1. The documented syntax zendesk:methodName fails endpoint creation
The endpoint syntax is {{zendesk:methodName}} and the doc has a YAML example
with {{uri: zendesk:getTicket}}. With a single path element
{{AbstractApiComponent.createEndpoint}} passes an empty API name, and
{{ZendeskComponent.getApiName}} (main 2a465aa4814c, line 57) converts {{""}} to
{{ZendeskApiName}} with the type converter, which fails with "Enum class
ZendeskApiName does not have any constant with value: " (the only constant is
{{DEFAULT("")}}, whose enum name is {{DEFAULT}}). Only
{{zendesk:default/getTicket}} works. Checked on 4.24.0-SNAPSHOT with a local
JDK HttpServer as the Zendesk server: {{zendesk:getTicket?inBody=id}} cannot be
created, {{zendesk:default/getTicket?inBody=id}} works.
Proposed: in {{ZendeskComponent.getApiName}} return {{ZendeskApiName.DEFAULT}}
for an empty (or {{default}}) name, so the documented syntax and the doc
example work.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)