Skip to content

feat(verification): add PlantUML and Vocabulary support for Docker-based verification - #271

Merged
DianaLease merged 1 commit into
accordproject:mainfrom
apoorv7g:PlantUML-Vocab-CI
Jul 23, 2026
Merged

feat(verification): add PlantUML and Vocabulary support for Docker-based verification#271
DianaLease merged 1 commit into
accordproject:mainfrom
apoorv7g:PlantUML-Vocab-CI

Conversation

@apoorv7g

Copy link
Copy Markdown
Contributor

This PR extends the Docker-based codegen verification harness with two new schema targets: PlantUML and Vocabulary. Each target gets a Docker image, an entrypoint that generates from the corpus and runs an external validator, a local Mocha verification test, registration in verification/docker/targets.json and scripts/verification/docker-run.js, a verify:docker:<target> npm script, and a matrix entry in .github/workflows/verify-codegen.yml.

Changes

  • Registered plantuml and vocabulary in verification/docker/targets.json.
  • Extended scripts/verification/docker-run.js TARGETS to include both.
  • Added npm scripts: verify:docker:plantuml, verify:docker:vocabulary.
  • Added both targets to the verify-codegen GitHub Actions matrix.
  • Extended per-target skip documentation in test/verification/cases.js to mention plantuml and vocabulary.
  • Gitignored verification/templates/plantuml-*.jar (downloaded on first local test run).

PlantUML (plantuml)

  • Added verification/docker/plantuml/Dockerfile and entrypoint.sh.
  • Image installs OpenJDK 17 JRE plus fontconfig / DejaVu fonts (PlantUML loads fontmanager even for -syntax), and downloads plantuml-1.2024.7.jar at build time.
  • Entrypoint generates CTO to .puml via CLI target PlantUML, then syntax-checks each file with java -jar plantuml.jar -syntax.
  • Added test/verification/plantuml.validate.test.js: generates with PlantUMLVisitor, validates with the official PlantUML jar. Downloads the jar into verification/templates/ on first run when missing (override with PLANTUML_JAR). Skips when Java is not installed.

Vocabulary (vocabulary)

  • Added verification/docker/vocabulary/Dockerfile, entrypoint.sh, and validate.js.
  • Image uses the base image's existing @accordproject/concerto-vocabulary dependency; no extra packages required.
  • Entrypoint generates via CLI target Vocabulary, then validates each .voc file with VocabularyManager.addVocabulary via validate.js.
  • Added test/verification/vocabulary.validate.test.js: generates with VocabularyVisitor and reuses the same validate.js helper for structural checks (locale, namespace, declarations).

Flags

  • PlantUML local tests require a JRE. The jar is downloaded automatically on first run (same pattern as Avro tools / Jackson jars).
  • PlantUML Docker image downloads the PlantUML release jar at build time from GitHub Releases.
  • Vocabulary validation is structural (YAML shape via VocabularyManager), not a full round-trip against a ModelManager locale set.
  • No new case/target skips were required for PlantUML or Vocabulary in this PR.

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

…sed verification

- Introduced PlantUML and Vocabulary as new targets in the Docker verification setup.
- Updated package.json and Dockerfiles to include necessary configurations for PlantUML and Vocabulary validation.
- Added new validation tests for PlantUML syntax and Vocabulary structure to ensure proper generation and verification.
- Enhanced the verification manifest to include PlantUML and Vocabulary as targets.

This commit expands the verification capabilities to include PlantUML and Vocabulary, ensuring a consistent environment for testing and validation.

Signed-off-by: Apoorv <130035517+APOORV7G@users.noreply.github.com>

@DianaLease DianaLease left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@DianaLease
DianaLease merged commit 5cdbd19 into accordproject:main Jul 23, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants