Fix camel validate normalize command#23390
Merged
Merged
Conversation
The normalize command had two bugs making it non-functional: 1. Files with .camel.yaml extension were silently skipped because matchFile() used FileUtil.onlyExt(name) which returns "camel.yaml" for double extensions. Fixed by using onlyExt(name, true) for single-extension mode, consistent with other JBang commands. Same fix applied to YamlValidateCommand. 2. Route reification failed for complex EIPs (CircuitBreaker, etc.) because the lightweight CamelContext lacked required implementations. Rewrote to delegate to the Run command with dumpRoutes=yaml, the same proven pattern used by TransformRoute. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The canonical YAML DSL format should use expanded parameters as key/value pairs rather than inlining them as query strings in the URI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
oscerd
approved these changes
May 20, 2026
Contributor
|
🧪 CI tested the following changed modules:
✅ POM dependency changes: targeted tests included Modules affected by dependency changes (1)
All tested modules (2 modules)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Claude Code on behalf of Claus Ibsen
Fix the
camel validate normalizecommand which was non-functional due to two bugs:.camel.yamlfiles silently skipped:FileUtil.onlyExt(name)returnscamel.yamlfor double extensions — changed toFileUtil.onlyExt(name, true)(single-extension mode) to correctly returnyaml. Same fix applied toYamlValidateCommand.Runcommand withcamel.main.dumpRoutes=yaml, following the same proven pattern used byTransformRoute.dumpRoutesUriAsParameters=trueso the canonical output uses expandedparameters:blocks instead of inlining parameters as query strings.Test plan
mvn install -pl dsl/camel-jbang/camel-jbang-plugin-validate -am -DskipTests -qcamel validate normalize timer-log.camel.yaml— produces canonical YAML with expanded parameterscamel validate normalize route.camel.yaml— no longer fails on missing EIP implementations🤖 Generated with Claude Code