Claus Ibsen created CAMEL-25715:
-----------------------------------
Summary: camel-jbang - camel cmd eval breaks an expression with a
double quote or a slash
Key: CAMEL-25715
URL: https://issues.apache.org/jira/browse/CAMEL-25715
Project: Camel
Issue Type: Bug
Components: camel-jbang
Reporter: Claus Ibsen
Fix For: 4.24.0, 4.22.2
camel cmd eval, and the tools that evaluate an expression in a running
integration (the eval_expression tool of camel ask, camel_eval_expression of
the MCP servers with an integration selected), JSON-escaped the expression and
the body before putting them in the action, which is JSON already. The eval
action of the CLI connector reads the values as they are, so an expression with
a double quote failed, such as ${body} == "hello" (Binary operator == does not
accept \"hello\" ...), and a slash, as in every XPath, or a quote in the body
became part of the text.
Fixed on main in https://github.com/apache/camel/pull/27979 (found while
testing the CLI for CAMEL-23688). On camel-4.22.x only EvalExpressionCommand
has the bug.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)