Claus Ibsen created CAMEL-24842:
-----------------------------------
Summary: YAML DSL: an endpoint with query options in the uri and a
parameters block fails with 'Uri should not contains query parameters'; say
what to do (and flag it in camel validate)
Key: CAMEL-24842
URL: https://issues.apache.org/jira/browse/CAMEL-24842
Project: Camel
Issue Type: Improvement
Components: camel-yaml-dsl, camel-jbang
Reporter: Claus Ibsen
Written like this, with the options split between the uri and {{parameters}}:
{code:yaml}
- to:
uri: file://inbox?fileExist=Override
parameters:
fileName: invoice-2001.json
{code}
{{camel run}} fails with
{code}
Error starting Camel: Error constructing YAML node id: to
Caused by: Uri should not contains query parameters (uri:
file://inbox?fileExist=Override)
{code}
and {{camel validate yaml}} says nothing (the file validates). The message
should say what to write: "the uri has query options (fileExist=Override) and
the step also has parameters: put every option under parameters: (fileExist:
Override) or all of them in the uri, not both", with the line number, and the
validator should report the same before the run.
Found in the round-2 local-model benchmark on the camel-jbang-examples ladder
(file-processing): a validated file that failed at startup with a message about
a rule the reader cannot guess.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)