Skip to content

CAMEL-25736: YAML examples for the data formats and languages that had none - #28023

Merged
davsclaus merged 1 commit into
mainfrom
fix/CAMEL-25736-part2
Oct 17, 2026
Merged

davsclaus merged 1 commit into
mainfrom
fix/CAMEL-25736-part2

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

Second part of CAMEL-25736: the data formats and languages whose documentation had no YAML route example. camel_catalog_sample reads its samples from the documentation, so it had nothing to give for them.

What

  • YAML examples for 14 data formats on 12 pages: asn1, barcode, bindy (bindyCsv, bindyFixed, bindyKvp), crypto, fhirJson, fhirXml, flatpack, fory, jaxb, jsonApi, mimeMultipart and parquetAvro.
    • Where the page has a Java example, the YAML example is a tab next to it, as on the other data format pages.
    • The jaxb and bindy pages get a "Using the YAML DSL" section after their Spring XML section.
    • fory, jsonApi, fhirJson and fhirXml had no usage example. They get a short Usage section.
  • YAML examples for 3 languages: js, openfeature and python.
    • js and python: a predicate in a choice, and an expression that sets the body. They had no example at all.
    • openfeature: a YAML tab next to each Java example. The section "Java DSL" is now "Filter", as it shows a filter.
    • The file language page stays without one, on purpose. file is also a component. With samples for both, camel_catalog_sample file answers with a choice of kind, instead of the file component samples (29, three of them with ${file:...}).
  • What the examples needed to say, checked in the code:
    • crypto: the key is a bean. The YAML example makes it with a Groovy script, and the initialization vector the same way.
    • parquetAvro: to marshal POJOs, unmarshalType is needed on marshal too, because the schema comes from that class.
    • fory: the data format registers the unmarshalType class, so it belongs on marshal too.
    • bindy: without locale, numbers follow the locale of the JVM. On a machine with a Danish or German locale, 2500.45 is written as 2500,45 in a comma-separated file.
  • flatpack Java examples fixed: they used Spring's ClassPathResource (setDefinition takes the resource name) and an undefined variable.
  • CatalogSamples puts the samples of the asked data format first. The univocity pages show the csv, fixed and tsv formats, so univocityTsv got the csv and fixed samples (2 by default). bindyCsv, bindyFixed and bindyKvp share the bindy page and are told apart by their type.

The catalog copies of the 15 pages are updated with them.

Checks

  • Every new example passes camel_validate_source.
  • Run with 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).
  • Data formats with a sample of their own: 56 of 56 (42 before). Languages: 28 of 29 (25 before), all but file.
  • With samples for both kinds, crypto and flatpack now answer with a choice of component or data format, as avro does. They are different things, so the model should say which one it wants.
  • On a full reactor build, the tests of camel-catalog (1101), camel-yaml-dsl-validator (240), camel-jbang-core (2503) and camel-jbang-mcp (503) pass, CatalogDocExamplesTest included.
  • 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

…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
@davsclaus davsclaus added this to the 4.24.0 milestone Oct 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-asn1
  • components/camel-barcode
  • components/camel-bindy
  • components/camel-crypto
  • components/camel-fhir/camel-fhir-component
  • components/camel-flatpack
  • components/camel-fory
  • components/camel-javascript
  • components/camel-jaxb
  • components/camel-jsonapi
  • components/camel-mail
  • components/camel-openfeature
  • components/camel-parquet-avro
  • components/camel-python
  • dsl/camel-jbang/camel-jbang-core

ℹ️ Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the test-dependents label to force testing all dependents.


🔬 Scalpel shadow comparison — Scalpel: 88 of 706 tested, 25 compile-only — current: 88 all tested

Maveniverse 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)
  • camel-a2a ← downstream of org.apache.camel:camel-vertx-http
  • camel-ai-observability ← downstream of org.apache.camel:camel-telemetry
  • camel-as2 ← downstream of org.apache.camel:camel-jetty
  • camel-asn1 ← components/camel-asn1/src/main/docs/asn1-dataformat.adoc
  • camel-atmosphere-websocket ← downstream of org.apache.camel:camel-servlet
  • camel-barcode ← components/camel-barcode/src/main/docs/barcode-dataformat.adoc
  • camel-bindy ← components/camel-bindy/src/main/docs/bindy-dataformat.adoc
  • camel-clickup ← downstream of org.apache.camel:camel-netty-http
  • camel-consul ← downstream of org.apache.camel:camel-jetty
  • camel-crypto ← components/camel-crypto/src/main/docs/crypto-dataformat.adoc
  • camel-cxf-rest ← downstream of org.apache.camel:camel-jaxb
  • camel-cxf-soap ← downstream of org.apache.camel:camel-jaxb
  • camel-cxf-spring-rest ← downstream of org.apache.camel:camel-jaxb
  • camel-cxf-spring-soap ← downstream of org.apache.camel:camel-jaxb
  • camel-cxf-spring-transport ← downstream of org.apache.camel:camel-cxf-transport
  • camel-cxf-transport ← downstream of org.apache.camel:camel-undertow
  • camel-fhir ← components/camel-fhir/camel-fhir-component/src/main/docs/fhirJson-dataformat.adoc, components/camel-fhir/camel-fhir-component/src/main/docs/fhirXml-dataformat.adoc
  • camel-flatpack ← components/camel-flatpack/src/main/docs/flatpack-dataformat.adoc
  • camel-fory ← components/camel-fory/src/main/docs/fory-dataformat.adoc
  • camel-java-joor-dsl ← downstream of org.apache.camel:camel-telegram
  • camel-javascript ← components/camel-javascript/src/main/docs/js-language.adoc
  • camel-jaxb ← components/camel-jaxb/src/main/docs/jaxb-dataformat.adoc
  • camel-jbang-mcp ← downstream of org.apache.camel:camel-catalog
  • camel-jbang-plugin-mcp ← downstream of org.apache.camel:camel-jbang-core
  • camel-jbang-plugin-tui ← downstream of org.apache.camel:camel-catalog
  • camel-jbang-plugin-validate ← downstream of org.apache.camel:camel-jbang-core
  • camel-jetty ← downstream of org.apache.camel:camel-jaxb
  • camel-jetty-common ← downstream of org.apache.camel:camel-jaxb
  • camel-jsonapi ← components/camel-jsonapi/src/main/docs/jsonApi-dataformat.adoc
  • camel-jsonpath ← downstream of org.apache.camel:camel-platform-http-vertx
  • camel-knative-http ← downstream of org.apache.camel:camel-platform-http-vertx
  • camel-langchain4j-agent ← downstream of org.apache.camel:camel-telemetry
  • camel-langchain4j-chat ← downstream of org.apache.camel:camel-telemetry
  • camel-langchain4j-embeddings ← downstream of org.apache.camel:camel-telemetry
  • camel-langchain4j-embeddingstore ← downstream of org.apache.camel:camel-langchain4j-embeddings
  • camel-launcher-container ← downstream of org.apache.camel:camel-launcher
  • camel-lra ← downstream of org.apache.camel:camel-undertow
  • camel-mail ← components/camel-mail/src/main/docs/mimeMultipart-dataformat.adoc
  • camel-mail-microsoft-oauth ← downstream of org.apache.camel:camel-mail
  • camel-mcp-server ← downstream of org.apache.camel:camel-platform-http-vertx
  • camel-micrometer-observability ← downstream of org.apache.camel:camel-undertow
  • camel-micrometer-prometheus ← downstream of org.apache.camel:camel-platform-http-main
  • camel-netty-http ← downstream of org.apache.camel:camel-jaxb
  • camel-oauth ← downstream of org.apache.camel:camel-servlet
  • camel-observability-services ← downstream of org.apache.camel:camel-opentelemetry2
  • camel-openai ← downstream of org.apache.camel:camel-telemetry
  • camel-openapi-validator ← downstream of org.apache.camel:camel-rest-openapi
  • camel-openfeature ← components/camel-openfeature/src/main/docs/openfeature-language.adoc
  • camel-opentelemetry ← downstream of org.apache.camel:camel-undertow
  • camel-opentelemetry2 ← downstream of org.apache.camel:camel-undertow
  • camel-parquet-avro ← components/camel-parquet-avro/src/main/docs/parquetAvro-dataformat.adoc
  • camel-platform-http-main ← downstream of org.apache.camel:camel-platform-http-vertx
  • camel-platform-http-vertx ← downstream of org.apache.camel:camel-rest-openapi
  • camel-pqc ← downstream of org.apache.camel:camel-crypto
  • camel-python ← components/camel-python/src/main/docs/python-language.adoc
  • camel-quickfix ← downstream of org.apache.camel:camel-jetty
  • camel-rest-openapi ← downstream of org.apache.camel:camel-jaxb
  • camel-rest-postman ← downstream of org.apache.camel:camel-vertx-http
  • camel-restdsl-openapi-plugin ← downstream of org.apache.camel:camel-servlet
  • camel-semantic ← downstream of org.apache.camel:camel-xml-io-dsl
  • camel-semantic-openai ← downstream of org.apache.camel:camel-openai
  • camel-semantic-typesafe-ai ← downstream of org.apache.camel:camel-xml-io-dsl
  • camel-semantic-wolf-defender ← downstream of org.apache.camel:camel-semantic
  • camel-servlet ← downstream of org.apache.camel:camel-jaxb
  • camel-slack ← downstream of org.apache.camel:camel-undertow
  • camel-soap ← downstream of org.apache.camel:camel-jaxb
  • camel-spring-ai-chat ← downstream of org.apache.camel:camel-telemetry
  • camel-spring-ws ← downstream of org.apache.camel:camel-jaxb
  • camel-state-store ← downstream of org.apache.camel:camel-test-main-junit5
  • camel-stax ← downstream of org.apache.camel:camel-jaxb
  • camel-telegram ← downstream of org.apache.camel:camel-netty-http
  • camel-telemetry ← downstream of org.apache.camel:camel-undertow
  • camel-telemetry-dev ← downstream of org.apache.camel:camel-undertow
  • camel-test-main-junit5 ← downstream of org.apache.camel:camel-xml-io-dsl
  • camel-test-main-junit6 ← downstream of org.apache.camel:camel-xml-io-dsl
  • camel-typesafe-ai ← downstream of org.apache.camel:camel-xml-io-dsl
  • camel-undertow ← downstream of org.apache.camel:camel-jaxb
  • camel-undertow-spring-security ← downstream of org.apache.camel:camel-undertow
  • camel-vertx-http ← downstream of org.apache.camel:camel-undertow
  • camel-webhook ← downstream of org.apache.camel:camel-netty-http
  • camel-whatsapp ← downstream of org.apache.camel:camel-netty-http
  • camel-xml-io-dsl ← downstream of org.apache.camel:camel-telegram
  • camel-xml-jaxb-dsl ← downstream of org.apache.camel:camel-telegram
  • camel-xml-jaxb-dsl-test-definition ← downstream of org.apache.camel:camel-telegram
  • camel-xml-jaxb-dsl-test-spring ← downstream of org.apache.camel:camel-telegram
  • camel-yaml-dsl-validator ← downstream of org.apache.camel:camel-catalog
  • camel-yaml-dsl-validator-maven-plugin ← downstream of org.apache.camel:camel-yaml-dsl-validator
  • camel-zookeeper ← downstream of org.apache.camel:camel-jetty
Modules with tests skipped (25)
  • apache-camel
  • camel-allcomponents
  • camel-catalog-console
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-endpointdsl
  • camel-endpointdsl-support
  • camel-itest
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • docs
  • dummy-component

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • dsl/camel-jbang/camel-jbang-core: 2 test(s) disabled on GitHub Actions

💡 Manual integration tests recommended:

You modified dsl/camel-jbang/camel-jbang-core. The related integration tests in dsl/camel-jbang/camel-jbang-it are excluded from CI. Consider running them manually:

mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
Build reactor — dependencies compiled but only changed modules were tested (16 modules, 2m 33s total)

Total reactor time: 2m 33s

Module Duration Status
Camel :: JAXB 20.8s SUCCESS
Camel :: Bindy 20.5s SUCCESS
Camel :: Catalog :: Camel Catalog 18.6s SUCCESS
Camel :: OpenFeature 16.0s SUCCESS
Camel :: Parquet Avro 15.9s SUCCESS
Camel :: Python 13.8s SUCCESS
Camel :: FlatPack 11.5s SUCCESS
Camel :: Crypto 11.3s SUCCESS
Camel :: JavaScript 7.8s SUCCESS
Camel :: ASN.1 5.1s SUCCESS
Camel :: Barcode 5.0s SUCCESS
Camel :: Fory 3.3s SUCCESS
Camel :: JSonApi 3.1s SUCCESS
Camel :: FHIR n/a
Camel :: JBang :: Core n/a
Camel :: Mail n/a

Top 20 slowest modules:

  • Camel :: JAXB (20.8s)
  • Camel :: Bindy (20.5s)
  • Camel :: Catalog :: Camel Catalog (18.6s)
  • Camel :: OpenFeature (16.0s)
  • Camel :: Parquet Avro (15.9s)
  • Camel :: Python (13.8s)
  • Camel :: FlatPack (11.5s)
  • Camel :: Crypto (11.3s)
  • Camel :: JavaScript (7.8s)
  • Camel :: ASN.1 (5.1s)
  • Camel :: Barcode (5.0s)
  • Camel :: Fory (3.3s)
  • Camel :: JSonApi (3.1s)

⚙️ View full build and test results

@davsclaus davsclaus self-assigned this Oct 17, 2026
@davsclaus davsclaus added the enhancement New feature or request label Oct 17, 2026
@davsclaus
davsclaus merged commit 94ca501 into main Oct 17, 2026
7 checks passed
@github-actions
github-actions Bot deleted the fix/CAMEL-25736-part2 branch October 17, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants