You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Brijesh Thakkar (Jira)" <ji...@apache.org> on 2026/09/21 14:24:00 UTC
[jira] [Commented] (CAMEL-24875) camel-jbang - camel validate yaml skips a multi-line simple expression (expression: | block scalar)
[ https://issues.apache.org/jira/browse/CAMEL-24875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18117766#comment-18117766 ]
Brijesh Thakkar commented on CAMEL-24875:
-----------------------------------------
Heyy i would love to take this issue
Please assign it to me
> camel-jbang - camel validate yaml skips a multi-line simple expression (expression: | block scalar)
> ---------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24875
> URL: https://issues.apache.org/jira/browse/CAMEL-24875
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang
> Reporter: Claus Ibsen
> Priority: Major
>
> {{SimpleChecks.validateYamlSimple}} (the simple checks of {{camel validate yaml}}, also used by the TUI AI answer check and the MCP validator) is line based: for {{simple:}} followed by {{expression: |}} or {{expression: >}} the value on the line is empty, so the whole expression is skipped without a report. Every multi-line simple expression is unchecked, and an init block ({{$init{ ... }init$}}) is always multi-line since each statement must end with {{;\n}}.
> Verified on 4.23.0-SNAPSHOT: a route with
> {code}
> - setBody:
> expression:
> simple:
> expression: |
> $init{
> $cleanName := ${trim()} -> ${normalizeWhitespace()} |> ${uppercase()}
> }init$
> Customer: ${cleanName(${header.customerName})}
> {code}
> validates with success, and fails at runtime with {{expected symbol whiteSpace but was character: operators and values must be separated by a space at location 43}}. A missing {{}init$}} is not reported either. The catalog can judge these once it is handed the whole text, as {{AbstractCamelCatalog.doValidateSimple}} delegates to {{SimpleLanguage.createExpression}}.
> Proposed: join the indented lines of a block scalar (and a multi-line plain/quoted scalar) into the expression text before validating, and report the error at the line of {{expression:}}. Found while analysing CAMEL-24874.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)