Claus Ibsen created CAMEL-25748:
-----------------------------------

             Summary: 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
             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)

Reply via email to