Claus Ibsen created CAMEL-25761:
-----------------------------------
Summary: camel-jbang - the AI validator misses the parameters of
an endpoint when another key (id, variableReceive) stands between uri and
parameters
Key: CAMEL-25761
URL: https://issues.apache.org/jira/browse/CAMEL-25761
Project: Camel
Issue Type: Bug
Components: camel-jbang
Reporter: Claus Ibsen
Fix For: 4.24.0
The endpoint checks of the AI validator (camel validate yaml,
camel_validate_source and the write tools of the camel-jbang-mcp server) look
for the parameters: block only in the lines right after uri:. Any other key of
the step in between ends the look-ahead, so the parameters are not seen:
{code}
- to:
uri: jms
variableReceive: answer
parameters:
destinationType: queue
destinationName: stock
{code}
{noformat}
Line 50: jms: the required option 'destinationName' is missing (the runtime
says 'Option destinationName is required'): write it in the uri, uri:
jms:<destinationName>, or under parameters as destinationName: <value>
{noformat}
The same happens with id: between uri: and parameters:, and with a parameters:
block written above uri:. The route is valid and runs. The other checks of
those options (unknown option, wrong value, placeholders) are skipped as well.
The write tools refuse a file with this error, so a model or a user is told to
fix what is already right.
Found while writing a JMS request-reply example (variableReceive on the
request-reply to).
Fix: look for parameters: among all keys of the step, before and after uri:.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)