davsclaus opened a new pull request, #26620:
URL: https://github.com/apache/camel/pull/26620
## Description
Two files that validate today and fail at startup, both found in the round-2
local-model benchmark on the camel-jbang-examples ladder and both hit by a
person the same way.
**CAMEL-24842.** Options in the uri and under `parameters:` at the same time:
```yaml
- to:
uri: file://inbox?fileExist=Override
parameters:
fileName: invoice-2001.json
```
The YAML DSL refuses the mix at startup with `Uri should not contains query
parameters`. The endpoint check now says, on the uri's line: *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
(the runtime refuses the mix with 'Uri should not contains query parameters')*.
The options are still merged and checked against the catalog, so an unknown
option is reported as before.
**CAMEL-24846.** An `onException` (or `onCompletion`, `intercept`,
`interceptFrom`, `interceptSendToEndpoint`) written after a route:
```
Line 6: onException must come before the routes: move this entry above the
first - route: (line 1); the runtime refuses it at startup ('onException must
be defined before any routes')
```
A new `StructureChecks` in camel-jbang-core, part of the catalog checks the
CLI and the camel-jbang-mcp validation tool run after the schema. Only
top-level entries count; an onException indented inside a route is the schema's
existing hint.
**The rss documentation example** had the feed URL's `?alt=rss` in the uri
and the component options under `parameters:`, the exact mix the runtime
refuses; the Java and XML tabs put everything in the uri, and the YAML tab now
does too (the component is lenient, so `alt` passes through to the feed URL).
## Tests
- `StructureChecksTest` (5): after a route, before, intercept and
onCompletion after a `- from:` route, inside a route (not reported here), no
routes.
- `SourceValidatorEndpointTest`: two new tests (a `to:` and a `from:` with
the mix); two existing tests that asserted the mix validates now assert the
message, since the runtime refuses it.
- `CatalogDocExamplesTest` (every YAML example of the documentation passes
the catalog checks) green with the rss example fixed; the whole `commands.ai`
test package green (202).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj
--
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]