[
https://issues.apache.org/jira/browse/CAMEL-26161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136598#comment-18136598
]
Claus Ibsen commented on CAMEL-26161:
-------------------------------------
PR: https://github.com/apache/camel/pull/28936
ZendeskComponent.getApiName now maps an empty API name to
ZendeskApiName.DEFAULT, so the documented zendesk:methodName works
(zendesk:default/methodName keeps working). Tested with a local JDK HttpServer
as the Zendesk server.
_Claude Code on behalf of Claus Ibsen (davsclaus)_
> 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
> Assignee: Claus Ibsen
> Priority: Major
> 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)