[
https://issues.apache.org/jira/browse/CAMEL-28047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrea Cosentino reassigned CAMEL-28047:
----------------------------------------
Fix Version/s: 4.25.0
Assignee: Andrea Cosentino
> camel-aws: the operation option is marked required although the header
> replaces it, in six components, and contradicts a defaultValue in seven
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-28047
> URL: https://issues.apache.org/jira/browse/CAMEL-28047
> Project: Camel
> Issue Type: Bug
> Components: camel-aws
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.25.0
>
>
> Found during an audit of the cloud components (camel-aws, camel-azure,
> camel-google, camel-huawei) at commit 7c0644752e17. Every item below was
> verified against the source.
> Two related metadata defects in the same option across the family.
> CAMEL-27623 already fixed the first one for aws2-ecs, so there is a precedent
> and a test to copy ({{ECS2OperationHeaderMetadataTest}}).
> h4. 1. required = true although the header replaces the option
> These configurations carry {{@Metadata(required = true)}} on {{operation}}
> while the option's own description says the {{CamelAws...Operation}} header
> replaces it, and the producer's {{determineOperation}} supports the
> header-only case. URI validation, the catalog, camel-jbang and IDE completion
> therefore reject a valid endpoint that sets the operation per message:
> * aws2-eks
> * aws2-kms
> * aws2-msk
> * aws2-polly
> * aws2-textract
> * aws2-translate
> (aws2-ec2, aws2-mq, aws2-step-functions and aws2-timestream have the same
> defect and are already covered by CAMEL-27658, CAMEL-27652, CAMEL-27636 and
> CAMEL-27678.)
> h4. 2. required = true together with a default
> These declare {{required = true}} and also give the option a default, either
> in the metadata or through a field initializer, which is self-contradictory:
> an option that has a default is never required.
> * aws2-comprehend - initializer {{=
> Comprehend2Operations.detectDominantLanguage}}
> * aws2-eventbridge - {{@Metadata(required = true, defaultValue = "putRule")}}
> and an initializer
> * aws2-polly
> * aws2-sts - {{@Metadata(required = true, defaultValue = "assumeRole")}} and
> an initializer
> * aws2-textract
> * aws2-translate
> * aws-security-hub
> Proposed change: drop {{required = true}} wherever a header or a default can
> supply the operation, and keep the producer-side error that names both the
> option and the header.
> _Claude Code on behalf of oscerd_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)