Schema Validator
The schema validator checks your ModernizeSpec files against the official JSON Schemas. Paste your JSON and see validation results in real time.
Interactive Validator
Section titled “Interactive Validator”How to Use
Section titled “How to Use”- Select the file type (manifest, domains, complexity, extraction-plan, parity-tests, or migration-state)
- Paste your JSON content into the editor
- Validation runs automatically and displays errors inline
Common Validation Errors
Section titled “Common Validation Errors”Missing Required Fields
Section titled “Missing Required Fields”Error: manifest.json — "legacy.framework" is requiredFix: Add "framework" to your legacy objectInvalid Enum Values
Section titled “Invalid Enum Values”Error: domains.json — contexts[0].type must be "core", "supporting", or "generic"Fix: Change the type value to one of the allowed optionsType Mismatches
Section titled “Type Mismatches”Error: complexity.json — hotspots[0].loc must be a numberFix: Remove quotes around the numeric valueOut-of-Range Values
Section titled “Out-of-Range Values”Error: migration-state.json — contexts[0].progress must be between 0 and 1Fix: Use a decimal (0.45) not a percentage (45)Validating Locally
Section titled “Validating Locally”With the CLI
Section titled “With the CLI”npx modernizespec validateReports all validation errors across all spec files in the project.
With the SDK
Section titled “With the SDK”import { ModernizeSpec } from "@modernizespec/sdk";
const spec = await ModernizeSpec.load("/path/to/project");const errors = spec.validate();
for (const error of errors) { console.error(`${error.file}: ${error.path} — ${error.message}`);}- name: Validate ModernizeSpec run: npx modernizespec validate --strict # Fails the build if any validation errors existNext Steps
Section titled “Next Steps”- JSON Schemas Overview — Schema design principles
- Quick Start — Set up ModernizeSpec in your project