Skip to content

Schema Validator

The schema validator checks your ModernizeSpec files against the official JSON Schemas. Paste your JSON and see validation results in real time.

  1. Select the file type (manifest, domains, complexity, extraction-plan, parity-tests, or migration-state)
  2. Paste your JSON content into the editor
  3. Validation runs automatically and displays errors inline
Error: manifest.json — "legacy.framework" is required
Fix: Add "framework" to your legacy object
Error: domains.json — contexts[0].type must be "core", "supporting", or "generic"
Fix: Change the type value to one of the allowed options
Error: complexity.json — hotspots[0].loc must be a number
Fix: Remove quotes around the numeric value
Error: migration-state.json — contexts[0].progress must be between 0 and 1
Fix: Use a decimal (0.45) not a percentage (45)
Terminal window
npx modernizespec validate

Reports all validation errors across all spec files in the project.

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 exist