Skip to content

Add content validate command for Page Designer metadefinitions#278

Merged
clavery merged 2 commits intomainfrom
content-validate
Mar 22, 2026
Merged

Add content validate command for Page Designer metadefinitions#278
clavery merged 2 commits intomainfrom
content-validate

Conversation

@clavery
Copy link
Copy Markdown
Collaborator

@clavery clavery commented Mar 22, 2026

Summary

  • Adds b2c content validate CLI command that validates Page Designer metadefinition JSON files against bundled JSON Schema draft-04 schemas
  • Bundles 19 schemas from B2C documentation covering all metadefinition types (pagetype, componenttype, aspecttype, cmsrecord, etc.)
  • Auto-detects schema type from file path conventions and JSON content heuristics, with explicit --type override
  • Supports glob patterns, directory expansion, --json output, and colored PASS/FAIL results
  • No instance connection or authentication required — purely local validation

Test plan

  • SDK tests pass: 32 new tests covering type detection, validation, $ref resolution, error cases
  • CLI tests pass: 6 new tests covering output formatting, JSON mode, flag passthrough, glob expansion
  • Manual test: ./cli content validate <path-to-metadefinition> with valid and invalid files
  • CI passes (lint, typecheck, full test suite)

Validate Page Designer metadefinition JSON files (page types, component
types, aspect types, etc.) against bundled JSON schemas. Supports
auto-detection of schema type from file paths and JSON content, explicit
--type override, glob patterns, directory expansion, and JSON output.
@github-actions github-actions Bot added the needs-3pl-review PR introduces net-new third-party dependencies and needs discussion label Mar 22, 2026
@clavery clavery added 3pl-approved Maintainer approved net-new third-party dependency additions and removed needs-3pl-review PR introduces net-new third-party dependencies and needs discussion labels Mar 22, 2026
@clavery clavery merged commit 8c31081 into main Mar 22, 2026
5 checks passed
@clavery clavery deleted the content-validate branch March 22, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3pl-approved Maintainer approved net-new third-party dependency additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant