davsclaus opened a new pull request, #30802:
URL: https://github.com/apache/camel/pull/30802

   Part 1 of [CAMEL-25200](https://issues.apache.org/jira/browse/CAMEL-25200) 
(`camel overview` shows where each route's body comes from). It changes the 
output of `camel validate` a little, so it is its own PR, as agreed on the 
JIRA. Part 2 (the body origin in `camel overview`) builds on it.
   
   ## What this does
   
   `BodyTypeFlow` reports a route that reads a body (jsonpath, unmarshal, ...) 
when nothing in it, or in any route that calls it, ever sets one. To find the 
callers it follows the calls between the routes of the file, but it read them 
with its own rules. Those were not the `EndpointRules` that `camel validate` 
and `camel overview` use for the endpoints between routes (CAMEL-25180, 
#27717). Now they are the same:
   
   - **`direct://lookup` is `direct:lookup`.** Camel resolves both to the same 
endpoint. A call or a route written with the slashes was not linked, so the 
finding was missed. `RouteGraph.normalize` reads an endpoint that links routes 
through `EndpointRules.endpoint`. Other endpoints keep their form 
(`https://...` stays as written, as the text body messages quote it).
   - **An `enrich` with a constant endpoint is a call** (`enrich: {constant: 
direct:lookup}`), read as `EndpointConsumers` already reads it (`uriOf` is now 
package-private for this).
   - **A `pollEnrich` is not a call.** It consumes its endpoint, like the route 
does. There is a new `RouteGraph.CALLS_A_ROUTE` for the calls. 
`RouteGraph.SENDS` keeps `pollEnrich`, because the text body checks 
(`TextBodyFlow`) use it for the steps that send or poll.
   
   ## Tests
   
   - `BodyTypeFlowTest`: a call written with slashes, on either side; an enrich 
with a constant endpoint (both fail without the fix); a pollEnrich with a 
constant endpoint is still not a caller.
   - camel-yaml-dsl-validator: all 380 tests pass.
   - camel-jbang-core, built against this validator: the overview, validate and 
parity tests (271) pass.
   
   _Claude Code on behalf of Claus Ibsen (davsclaus)_
   
   🤖 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]

Reply via email to