JSON Schema Version Migrator
JSON Schema Version Migrator: Replaces legacy `id` keyword with `$id` and updates `$schema` URI to Draft 2020-12.
About this json schema version migrator
Replaces legacy `id` keyword with `$id` and updates `$schema` URI to Draft 2020-12 Validates and converts interface schemas client-side without transmitting private endpoint specifications.
API contract & interface schema logic
Recursively rewrites the supported `id`/`$id`, `definitions`/`$defs`, and dependency-keyword pairs for Draft 2020-12 or Draft-07, then sets that draft's `$schema` URI. It is a selected-keyword converter, not a complete semantic migration or schema validator.
Worked schema conversion scenario
Scenario: An engineer rewrites selected legacy JSON Schema keywords toward Draft 2020-12 and then reviews the result.
Sample input:
Processing: Recursively replaces selected legacy `id`, `definitions`, and `dependencies` keywords with their 2020-12 forms and sets `$schema`.
Illustrative output:
Schema version & syntax constraints
Only selected keywords are rewritten; this is not full semantic migration or validation. Unsupported target values are rejected. It traverses schema locations only: example/default data stays unchanged, and local $ref paths are adjusted when definitions move.
API specifications and schema models in JSON Schema Version Migrator reflect OpenAPI and JSON Schema standards. Verify generated schemas against your runtime validator.
Client-side schema processing boundary
Schema analysis and protocol mapping in JSON Schema Version Migrator execute locally in the browser tab without uploading endpoint definitions.
OpenAPI Specification & JSON Schema standards
OpenAPI Specification standards and JSON Schema draft definitions:
- JSON Schema: A Media Type for Describing JSON Documents (Draft 2020-12)
- JSON Schema Validation: A Vocabulary for Structural Validation of JSON (Draft-07)
JSON Schema Version Migrator verification · Audit standards
How to use it
- Paste a JSON Schema or wrapper with schema and target.
- Rewrite selected id/$id, definitions/$defs and dependency keywords recursively for 2020-12 or Draft-07.
- Read the migrated JSON document and review it manually.
Frequently asked questions
What does JSON Schema Version Migrator change?+
It reads a JSON schema document and target draft, clones its structure, adjusts supported draft conventions, and emits a formatted migrated schema.
Can you show an input and its result?+
A schema with target 2020-12 produced output containing that target draft designation while preserving the supplied string-schema structure.
Does migration prove semantic equivalence?+
No. The tool rewrites known schema vocabulary locally; it does not validate instances, resolve remote references, test validators, or guarantee every draft feature has an equivalent.
Which input must be supplied?+
The primary input must parse as JSON. The target may be 2020-12 or draft-07, from target in the object or the secondary field; if omitted it defaults to 2020-12. Other target strings are rejected.
