[ 
https://issues.apache.org/jira/browse/CAMEL-26039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen reassigned CAMEL-26039:
-----------------------------------

    Assignee: Claus Ibsen

> camel-jbang - the source validator reports a header of a component written in 
> the short form of a to step
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26039
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26039
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>    Affects Versions: 4.23.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> The Camel* header check of the source validator ({{HeaderChecks}}, main 
> 07d2e7a987bc, line 59: {{SCHEME_IN_URI_PATTERN}}, used at line 240) finds the 
> components of a route only where the text has {{uri: scheme:}}. The short 
> form of a YAML step, {{- to: aws-secrets-manager:sm?operation=getSecret}}, 
> has no {{uri:}}, so the component is not seen, and a header of that component 
> set by the route is reported as not set by the other components:
> {noformat}
> - route:
>     from:
>       uri: timer:tick
>       steps:
>         - setHeader:
>             name: CamelAwsSecretsManagerSecretId
>             constant: my-secret
>         - to: aws-secrets-manager:sm?operation=getSecret
> {noformat}
> gives "Line 8: header CamelAwsSecretsManagerSecretId is not set by timer (the 
> value would be null)", and "fix them before writing the file"; the same route 
> with the long form of the step, {{to:}} with {{uri:}} and {{parameters:}}, is 
> valid. Checked on 4.24.0-SNAPSHOT with the {{camel_validate_source}} tool of 
> the MCP server. A model told to fix the route changes a correct one.
> *Proposed change*: find the scheme of a {{to:}}, {{toD:}}, {{from:}}, 
> {{wireTap:}} and the other endpoint steps in the short form too, or take the 
> schemes from the parsed routes.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to