Skip to content

CAMEL-23593: Fix YAML dump for REST DSL and routeConfigurations#23393

Merged
davsclaus merged 2 commits into
mainfrom
worktree-CAMEL-23593-normalize-rest-routeconfig
May 21, 2026
Merged

CAMEL-23593: Fix YAML dump for REST DSL and routeConfigurations#23393
davsclaus merged 2 commits into
mainfrom
worktree-CAMEL-23593-normalize-rest-routeconfig

Conversation

@davsclaus
Copy link
Copy Markdown
Contributor

@davsclaus davsclaus commented May 21, 2026

Summary

  • Fix YamlWriter to recognize rests and routeConfigurations as root container elements alongside routes and dataFormats. Without this, the YAML dump produces empty objects like rests: {} or routeConfigurations: {}, which breaks camel validate normalize for files containing REST DSL or routeConfiguration blocks.
  • Fix YamlWriter to place resilience4jConfiguration and faultToleranceConfiguration as direct properties of circuitBreaker instead of incorrectly putting them inside steps.
  • Fix NPE in YamlNormalizeCommand by wiring up the MavenResolverMixin (needed after CAMEL-23560 changes to Run.java).

Test plan

  • All 82 existing camel-yaml-io tests pass
  • camel validate normalize correctly normalizes REST DSL files
  • camel validate normalize correctly normalizes routeConfiguration files
  • camel validate normalize correctly normalizes circuitBreaker with resilience4j config
  • camel validate normalize still works for regular route files

Claude Code on behalf of Claus Ibsen

…igurations

The YamlWriter only special-cased "routes" and "dataFormats" as root
container elements. When dumping REST DSL or routeConfiguration blocks,
startElement/endElement fell through to the EipModel lookup path,
producing empty objects like "rests: {}" or "routeConfigurations: {}".

Add "rests" and "routeConfigurations" to the container name checks in
both startElement() and endElement(), and fix NPE in the normalize
command by wiring up the MavenResolverMixin.

Co-Authored-By: Claude <noreply@anthropic.com>
@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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🧪 CI tested the following changed modules:

  • core/camel-yaml-io
  • dsl/camel-jbang/camel-jbang-plugin-validate

ℹ️ 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.

Build reactor — dependencies compiled but only changed modules were tested (2 modules)
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: YAML IO

⚙️ View full build and test results

…AML dump

The resilience4jConfiguration and faultToleranceConfiguration were
incorrectly placed inside the circuitBreaker steps list instead of
as direct properties. Add special-case handling in YamlWriter to
treat them as configuration properties, following the same pattern
used for resequence batchConfig/streamConfig.

Co-Authored-By: Claude <noreply@anthropic.com>
@davsclaus davsclaus merged commit ae152fb into main May 21, 2026
6 checks passed
@davsclaus davsclaus deleted the worktree-CAMEL-23593-normalize-rest-routeconfig branch May 21, 2026 07:58
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.

1 participant