davsclaus opened a new pull request, #27181:
URL: https://github.com/apache/camel/pull/27181
_Claude Code on behalf of davsclaus_
A follow-up of #27172 (CAMEL-25208). YAML routes are checked on their text,
and Java and XML routes on the Camel model they are read into. The checks of a
uri and of an expression are shared, but what finds the uris and expressions is
not, so the three DSLs can drift apart. This PR adds a test that pins them
together, and fixes what it found.
**Depends on #27178** (main does not compile in camel-jbang-core). Its
commit is the first one here and drops out on rebase once #27178 is merged.
### Parity test
`DslParityTest` writes the same routes in YAML, Java and XML and asserts the
same problem, on the matching line, in all three:
- a valid route (no problem);
- an unknown option;
- an invalid enum value;
- a producer option on a consumer;
- a simple predicate that does not parse;
- an unknown simple function;
- a `to` with `${...}`;
- a producer-only component as `from`;
- several endpoints in one uri;
- a `direct:` endpoint no route consumes.
### What it found: YAML schema errors had no line
The errors of the YAML DSL schema were reported as `uri: to: the uri holds
an expression...`, without a line. So the TUI did not mark them on their line
(a misspelled option such as `logLevel` was only listed when saving), and
`camel validate` and `camel_validate_source` did not say where they were.
`YamlPointerLines` turns the JSON pointer of a schema error into the line it
points at; for a property that is not allowed, that is the line of its key. The
errors now start with `Line N: ` as the other checks do.
### YAML quick doc
On a `simple:` line, or the `expression:` under it, the quick doc panel says
the language and whether the EIP evaluates it as a predicate (`Simple
predicate: ${header.foo} == 'bar'`), as for Java and XML. The YAML quick doc
also falls back to the CLI's catalog when no integration is selected, as the
Java and XML one does.
Tests: camel-jbang-core (1361) and camel-jbang-plugin-tui (1457) pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]