Skip to content

CAMEL-23820: support custom directories in YAML DSL validator plugin#24234

Merged
davsclaus merged 2 commits into
apache:mainfrom
orpiske:fix/CAMEL-23820
Jun 24, 2026
Merged

CAMEL-23820: support custom directories in YAML DSL validator plugin#24234
davsclaus merged 2 commits into
apache:mainfrom
orpiske:fix/CAMEL-23820

Conversation

@orpiske

@orpiske orpiske commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a directories parameter to the camel-yaml-dsl-validator-maven-plugin that allows users to specify additional directories to scan for YAML files, beyond the default Maven resource directories.

This addresses CAMEL-23820, where the plugin only supported files in Maven resource directories, preventing usage in projects that store YAML routes in other locations.

Changes

  • Added directories parameter (@Parameter(property = "camel.directories")) accepting a list of directory paths
  • Both relative and absolute paths are supported; relative paths are resolved against the project base directory
  • Custom directories are scanned in addition to the default resource directories (backward compatible)
  • Updated the documentation with the new option and a usage example
  • Fixed pre-existing artifactId typo in doc examples (camel-yaml-dsl-validate-maven-plugin -> camel-yaml-dsl-validator-maven-plugin)
  • Synced the generated docs copy at docs/user-manual/
  • Added unit tests covering: absolute paths, relative paths, null directories, combined resources + custom dirs, and .camel.yaml extension filtering

Test plan

  • Unit tests pass (5 new tests in ValidateMojoTest)
  • Module build passes (mvn verify)
  • Full root build passes (mvnd -Dquickly clean install)
  • Generated docs copy synced and committed

Claude Code on behalf of Otavio Rodolfo Piske

Add a 'directories' parameter to the camel-yaml-dsl-validator-maven-plugin
that allows users to specify additional directories to scan for YAML files,
beyond the default Maven resource directories. Both relative and absolute
paths are supported.

Signed-off-by: Otavio Rodolfo Piske <angusyoung@gmail.com>
@orpiske orpiske requested a review from davsclaus June 24, 2026 14:58
@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.

@davsclaus davsclaus 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.

Thanks for the contribution — clean PR with good test coverage.

One issue to fix before merging:

Documentation typo: the <artifactId> in the new XML example is camel-yaml-dsl-validate-maven-plugin but the actual artifactId is camel-yaml-dsl-validator-maven-plugin (missing r in "validator"). Users copy-pasting this example won't resolve the plugin.

Otherwise looks good to me.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

@davsclaus

Copy link
Copy Markdown
Contributor

There are uncommitted changes
HEAD detached at pull/24234/merge
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: docs/user-manual/modules/ROOT/pages/camel-yaml-dsl-validator-maven-plugin.adoc

Fix 'camel-yaml-dsl-validate-maven-plugin' -> 'camel-yaml-dsl-validator-maven-plugin'
in all XML examples (2 pre-existing + 1 new) and sync the generated
docs copy at docs/user-manual/.

Signed-off-by: Otavio Rodolfo Piske <angusyoung@gmail.com>
@orpiske

orpiske commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for catching both issues. Fixed the artifactId typo (including 2 pre-existing instances on lines 29 and 51) and committed the synced docs copy at docs/user-manual/modules/ROOT/pages/camel-yaml-dsl-validator-maven-plugin.adoc.

Claude Code on behalf of Otavio Rodolfo Piske

@orpiske orpiske requested a review from davsclaus June 24, 2026 16:22
@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • docs
  • dsl/camel-yaml-dsl/camel-yaml-dsl-validator-maven-plugin

POM dependency changes: targeted tests included

Modules affected by dependency changes (2)
  • :camel-yaml-dsl-validator-maven-plugin
  • :docs
All tested modules (2 modules)
  • Camel :: Docs
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

@davsclaus davsclaus merged commit 0a38c5e into apache:main Jun 24, 2026
6 checks passed
@orpiske orpiske deleted the fix/CAMEL-23820 branch June 24, 2026 19:31
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