davsclaus opened a new pull request, #27155: URL: https://github.com/apache/camel/pull/27155
_Claude Code on behalf of davsclaus_ [CAMEL-25204](https://issues.apache.org/jira/browse/CAMEL-25204). Builds on #27153 and targets its branch; it moves to `main` when #27153 is merged. The endpoint DSL has typed header names: ```java public class R extends EndpointRouteBuilder { public void configure() { from(direct("in")) .setHeader(headers().kafka().kafkaKey(), constant("myKey")) // "CamelKafkaKey" .to(kafka("orders")); } } ``` The Java DSL parser could not read `headers()...`, so such a route was partial. The header methods are generated from the header names of each component (`EndpointDslMojo.headerNameMethodName`): a leading `Camel` is dropped, then camel case at `: - . _`, else the first letter lower case. The component method is the scheme as for the endpoint factories. So the catalog can find the header: - `EndpointDslResolver` gets `headerName(component, method)`. It is a default method returning null, as the rules cannot be reversed without the headers of the component. - `CatalogEndpointDslResolver` (camel-jbang) finds the endpoint header of the component whose generated method has that name. - The parser reads `headers().<component>().<header>()`, also qualified with `EndpointRouteBuilder.`, as that header name. When no resolver knows it, it reports it as unknown. The catalog lookup was checked against every header method of the generated endpoint DSL: 3456 of 3456 resolve to the header name the method returns. That check found one stale file, not changed here: `dsl/camel-endpointdsl/src/generated/.../ZeebeEndpointBuilderFactory.java` is still tracked, although the zeebe component was removed on 2026-08-25 (c0198f05b1e4). Nothing references it any more. ### Tests - `LwJavaParserTest.theHeaderNamesOfTheEndpointDsl`: resolved with a resolver that knows the header, reported without one. - `CatalogEndpointDslResolverTest`: file, kafka, a dotted header (cxfrs), a dashed one (imap `Reply-To`), aws2S3, unknown header and component; the method-name rule. - camel-java-io: 176; camel-jbang-core AI tests: 333 🤖 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]
