davsclaus opened a new pull request, #27278: URL: https://github.com/apache/camel/pull/27278
[CAMEL-25265](https://issues.apache.org/jira/browse/CAMEL-25265) > Stacked on #27277 (CAMEL-25264). It contains that PR's commit until #27277 is merged; then I'll rebase it and the diff is only this commit. This PR goes through all 29 language pages. Examples that showed a route in only one or two of the DSLs, or that were not grouped in `[tabs]`, now show it in **Java, XML and YAML tabs**, with the YAML in the canonical form. This matters for AI agents and the local model benchmark. The YAML examples of a page are what `camel_catalog_sample` serves, and a language whose examples were Java only gave an agent nothing to copy. jq, jsonpath, xpath, groovy and datasonnet are what the transform rungs use. ## Pages | Page | Change | |---|---| | **jq** | All 6 Java-only routes: the `source` option and the `header`, `property`, `constant` and `variable` functions, including a default value | | **jsonpath** | suppressExceptions, allowSimple, split, writeAsString, unpack, and the `source` option. The two Java variants plus the XML-only block for `source` become one tab group. | | **xpath** | Variables and headers as XPath variables (the stray `}` after the Java route is gone), and namespaces (YAML `namespace:` list, xml-io root prefix) | | **xquery** | Namespaces, shared namespaces (Java tab with `namespacesRef`), `text()` with a `String` result, and external variables | | **groovy** | YAML tab; `queue:` replaced by `seda:` because `queue` is not a component and the YAML catalog check rejects it | | **datasonnet** | The result-type fragments become a small route in all three DSLs | | **xtokenize, constant** | Java tabs. constant's external-resource example becomes a route that loads `resource:file:stock.json` | | **java** | Bean injection, bean variable, alias, multi-statement and hot-reload routes. Java uses `expression().java(...).preCompile(false)` instead of configuring the language. | | **quickjs, spel, wasm, jactl, python3** | Their Java-only routes. A `RouteBuilder` class with its static import stays as the Java tab. | | **typesafe-ai** | The Java, XML and YAML blocks are now tabs, and the YAML moved from the shorthand `- from:` / `to: direct:...` to the canonical form | | **bean, hl7terser** | `method` by `beanType`, and the `hl7terser` expression | **Left as they are, on purpose:** - Java API code with no DSL equivalent: `resolveLanguage(...).createPredicate`, `JavaLanguage` configuration, the HL7 `ValidationContext`, and the bean-instance variant. - Script contents. - Legacy Spring `<beans>` XML. - The **semantic** language, which is part of the DSL extensions design (CAMEL-25259). ## Found along the way - The jsonpath `allowSimple` example called `jsonpath(expr, false, false)`, which does not exist. It was a fragment, so nothing checked it. As a route it fails `CatalogDocJavaExamplesTest`, and it now uses `expression().jsonpath(...).allowSimple(false).end()`. ## Verified These run against a catalog that carries the edited pages (the doc mirrors are regenerated in `camel-catalog`): - `EipDocExamplesTest` and `UserManualDocExamplesTest`: the YAML validator and schema; - `CatalogDocExamplesTest`: catalog checks such as endpoint URIs; - `CatalogDocJavaExamplesTest`: Java DSL calls replayed by the parser; - `DocExamplesXmlSchemaTest` and `DocExamplesJavaImportsTest`. All pass. A re-scan of the 29 pages finds only the exemptions above. _Claude Code on behalf of 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]
