[
https://issues.apache.org/jira/browse/CAMEL-27623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on CAMEL-27623 started by shashank.
----------------------------------------
> camel-aws2-ecs: operation required despite header, header labels, unused
> label path
> -----------------------------------------------------------------------------------
>
> Key: CAMEL-27623
> URL: https://issues.apache.org/jira/browse/CAMEL-27623
> Project: Camel
> Issue Type: Bug
> Components: camel-aws2
> Reporter: Claus Ibsen
> Assignee: shashank
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-aws2-ecs for
> CAMEL-23832 (PR https://github.com/apache/camel/pull/30962).
> These are separate problems of the component; the descriptions PR only
> documents the current behavior.
> h4. 1. The operation option is marked required, but a header can replace it
> {{ECS2Configuration.operation}} has {{@Metadata(required = true)}}.
> {{ECS2Producer.determineOperation()}} reads the {{CamelAwsECSOperation}}
> header first, and uses the option only when the header is not set. It fails
> only when both are missing.
> So a route that sets the operation only in the header, such as
> {{to("aws2-ecs:label")}}, works, but the catalog and the tools that validate
> endpoint URIs report a missing required option.
> Proposed change: remove {{required = true}} from {{operation}}, as the
> producer already fails with a clear message when neither the option nor the
> header is set.
> h4. 2. The header labels are operation names instead of producer
> In {{ECS2Constants}}, {{CamelAwsECSNextToken}} and {{CamelAwsECSIsTruncated}}
> have the label {{listClusters}}, and {{CamelAwsECSClusterArn}} has
> {{createCluster describeCluster deleteCluster}}. {{CamelAwsECSOperation}},
> {{CamelAwsECSMaxResults}} and {{CamelAwsECSClusterName}} have no label.
> The component is producer only, and the documentation groups headers by these
> labels, so the header table shows labels that are not consumer or producer,
> and different ones per header.
> Proposed change: give every header the label {{producer}}, and name the
> operations that use a header in its description.
> h4. 3. The label path is required, but the component does not use it
> {{ECS2Configuration.label}} is a {{@UriPath}} with {{@Metadata(required =
> true)}}, but it has no getter or setter, and
> {{ECS2Component.createEndpoint()}} ignores the remaining part of the URI. The
> value never reaches the endpoint.
> Proposed change: decide whether the path stays as a free name for the
> endpoint (then document it as such) or becomes optional. Other AWS components
> use the same pattern, so they could be changed together.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)