Repository navigation
CAMEL-25736: YAML examples for the data formats and languages that had none - #28023
Conversation
…d none The documentation of 14 data formats and 3 languages had no YAML route example, so camel_catalog_sample had nothing to give for them: asn1, barcode, bindyCsv, bindyFixed, bindyKvp, crypto, fhirJson, fhirXml, flatpack, fory, jaxb, jsonApi, mimeMultipart and parquetAvro, and the js, openfeature and python languages. The file language page stays without one: file is also a component, and with samples for both, a sample for file would be a choice of kind instead of the file component samples, which already use the file functions. - A Java example gets a YAML tab next to it. The jaxb and bindy pages get a YAML DSL section after their Spring XML section, and the pages without a usage example get one. - The flatpack Java examples used Spring's ClassPathResource and an undefined variable; setDefinition takes the resource name. - The samples that use the asked data format come first: the univocity pages show the csv, fixed and tsv formats, and bindyCsv, bindyFixed and bindyKvp share the bindy page, told apart by their type. The catalog copies of the pages are updated with them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
gnodet-bot
left a comment
There was a problem hiding this comment.
Solid documentation PR. The new dataFormatUse() method is correctly designed for its purpose (sorting, not filtering) — it puts matching samples first rather than discarding non-matching ones. The YAML examples are structurally valid per the Camel YAML DSL spec, and the test refactoring properly preserves the "no YAML" hint coverage through a mocked catalog.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 88 of 706 tested, 25 compile-only — current: 88 all testedMaveniverse Scalpel detected 88 affected modules (current approach: 88). Skip-tests mode would test 88 modules (16 direct + 74 downstream), skip tests for 25 (generated code, meta-modules) Modules Scalpel would test (88)
Modules with tests skipped (25)
💡 Manual integration tests recommended:
Build reactor — dependencies compiled but only changed modules were tested (16 modules, 2m 33s total)Total reactor time: 2m 33s
Top 20 slowest modules:
|
Second part of CAMEL-25736: the data formats and languages whose documentation had no YAML route example.
camel_catalog_samplereads its samples from the documentation, so it had nothing to give for them.What
fileis also a component. With samples for both,camel_catalog_sample fileanswers with a choice of kind, instead of the file component samples (29, three of them with${file:...}).unmarshalTypeis needed on marshal too, because the schema comes from that class.unmarshalTypeclass, so it belongs on marshal too.locale, numbers follow the locale of the JVM. On a machine with a Danish or German locale,2500.45is written as2500,45in a comma-separated file.ClassPathResource(setDefinitiontakes the resource name) and an undefined variable.CatalogSamplesputs the samples of the asked data format first. The univocity pages show the csv, fixed and tsv formats, sounivocityTsvgot the csv and fixed samples (2 by default). bindyCsv, bindyFixed and bindyKvp share the bindy page and are told apart by theirtype.The catalog copies of the 15 pages are updated with them.
Checks
camel_validate_source.camel run: the five crypto examples, the bindy examples (CSV, fixed-length and key-value, with small model classes), fory, fhirJson and fhirXml, barcode, mimeMultipart, and all the language examples (openfeature with the flags file of its tests).cryptoandflatpacknow answer with a choice of component or data format, asavrodoes. They are different things, so the model should say which one it wants.CatalogDocExamplesTestincluded.CatalogSamplesTest: the bindy and univocityTsv samples come in the right order, and the check of the answer for a page without an example no longer depends on a page of the documentation (it was bindy).🤖 Generated with Claude Code
https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m