migrating-json-schemas

Installation
SKILL.md

Migrating JSON Schemas Between Drafts

z-schema supports draft-04, draft-06, draft-07, draft-2019-09, and draft-2020-12. This skill covers migrating schemas between drafts and verifying them with z-schema.

Migration workflow

  1. Identify the source draft (check $schema or id/$id usage).
  2. Set the target version on the validator:
    import ZSchema from 'z-schema';
    const validator = ZSchema.create({ version: 'draft2020-12' });
    
  3. Run validator.validateSchema(schema) to surface incompatibilities.
  4. Fix each reported error using the keyword mapping below.
  5. Re-validate until the schema passes.

Quick reference: keyword changes

Related skills

More from zaggino/z-schema

Installs
65
GitHub Stars
344
First Seen
Feb 27, 2026