Marat Gubaidullin created CAMEL-24479:
-----------------------------------------
Summary: [camel-jbang] YAML validation incorrectly succeeds when
containing invalid properties
Key: CAMEL-24479
URL: https://issues.apache.org/jira/browse/CAMEL-24479
Project: Camel
Issue Type: Bug
Components: camel-jbang
Affects Versions: 4.22.0
Reporter: Marat Gubaidullin
Attachments: xxx.camel.yaml
*Description:*
When using the Camel JBang validate yaml command, the validation incorrectly
passes and reports success for a YAML route that contains explicitly invalid or
unknown properties.
*Steps to Reproduce:*
1. Create a file named xxx.camel.yaml with the following content containing an
invalid property (hello: world2) and conflicting expression elements:
[^xxx.camel.yaml]
{code:java}
expression:
groovy:
id: simple-4df51
expression: ${variable.message[messageType]} == "ACK"
simple: {}
hello: world
{code}
2. Run the validation command using Camel 4.22.0:
{code:java}
jbang "-Dcamel.jbang.version=4.22.0" camel@apache/camel validate yaml
xxx.camel.yaml
{code}
*Expected Behavior:*
The validation should fail and output an error indicating that hello is an
unknown/invalid property within the expression block, and flag the
conflicting/empty simple: {} block.
*Actual Behavior:*
The CLI silently ignores the invalid fields and incorrectly reports:
{code:java}
Validation success (files:1)
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)