You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/10/18 07:55:00 UTC

[jira] [Assigned] (CAMEL-25748) camel-yaml-dsl-validator - the hint for a script file under groovy: resource: drops the resource: prefix

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

Claus Ibsen reassigned CAMEL-25748:
-----------------------------------

    Assignee: Claus Ibsen

> camel-yaml-dsl-validator - the hint for a script file under groovy: resource: drops the resource: prefix
> --------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25748
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25748
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-yaml-dsl
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> A model often writes a script file as a property of the language, which the schema does not have:
> {code}
> - setBody:
>     expression:
>       groovy:
>         resource: "file:shipment-mapping.groovy"
> {code}
> The validator answers with the hint from apache/camel#27666: "the groovy text goes in expression:, write groovy: \{expression: "file:shipment-mapping.groovy"\}". That form is wrong. Without the resource: prefix, Groovy runs file:shipment-mapping.groovy as code. The right form is expression: "resource:file:shipment-mapping.groovy".
> In the overnight benchmark of Oct 17-18 2026, this hint came up in 5 of 10 runs of one step. Two of those runs failed the step at the call limit, one of them after 22 refused writes. Across all benchmark series, 46 hints dropped the prefix.
> Fix: when the value is a script file and has no resource: prefix, the hint adds the prefix and says that a script file is loaded with it. A script file here is a value under resource: or resourceUri:, or a file:, classpath: or http(s): value under script:. Inline code keeps the hint as it is.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)