Summary
After updating $schema and $id URIs across a large schema library (~80 files), the jsonschema test command reports a stale metaschema identifier that no longer exists in any schema file.
Steps to reproduce
-
Start with a schema library where all files use a custom dialect as their $schema:
{ "$schema": "https://example.com/v2/dialect.json", "$id": "https://example.com/v2/asset.json" }
-
Update all files to use the standard 2020-12 dialect and new $id URIs:
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.com/v3/asset.json" }
-
Rename the directory from v2/ to v3/ and update all --resolve paths accordingly.
-
Verify with grep that no file contains the old URI (example.com/v2/dialect.json) — confirmed clean.
-
Run jsonschema test tests/v3/asset/ --resolve v3/asset.json --resolve v3/dialect.json [... all other resolves]
Expected behaviour
All tests pass, since the target schema (asset.json) now uses $schema: https://json-schema.org/draft/2020-12/schema.
Actual behaviour
error: Could not resolve the metaschema of the schema
at identifier https://example.com/v2/dialect.json
at file path tests/v3/asset/asset.test.json
This is likely because you forgot to import such schema using `--resolve/-r`
The old dialect URI (v2/dialect.json) is referenced in the error, but does not exist in any file on disk. Other test suites (e.g. kinship.test.json) targeting simpler schemas pass without issue.
Environment
jsonschema CLI: installed via pnpm (latest as of April 2026)
- Node: v22.22.1
- OS: Ubuntu 24.04 (WSL2)
Context
This was encountered during the INHERIT open estate data standard's v2→v3 migration. The affected schema (asset.json) uses allOf + if/then composition referencing 5 category sub-schemas — it's the most complex schema in the library, which may be relevant to reproduction.
The issue may be related to internal caching of metaschema resolution during a single jsonschema test run, where earlier resolved schemas (which pass) establish a resolution context that persists for later schemas.
Workaround
Not yet found — clearing node_modules/.cache did not help. The schema files themselves are verified correct.
Summary
After updating
$schemaand$idURIs across a large schema library (~80 files), thejsonschema testcommand reports a stale metaschema identifier that no longer exists in any schema file.Steps to reproduce
Start with a schema library where all files use a custom dialect as their
$schema:{ "$schema": "https://example.com/v2/dialect.json", "$id": "https://example.com/v2/asset.json" }Update all files to use the standard 2020-12 dialect and new
$idURIs:{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://example.com/v3/asset.json" }Rename the directory from
v2/tov3/and update all--resolvepaths accordingly.Verify with
grepthat no file contains the old URI (example.com/v2/dialect.json) — confirmed clean.Run
jsonschema test tests/v3/asset/ --resolve v3/asset.json --resolve v3/dialect.json [... all other resolves]Expected behaviour
All tests pass, since the target schema (
asset.json) now uses$schema: https://json-schema.org/draft/2020-12/schema.Actual behaviour
The old dialect URI (
v2/dialect.json) is referenced in the error, but does not exist in any file on disk. Other test suites (e.g.kinship.test.json) targeting simpler schemas pass without issue.Environment
jsonschemaCLI: installed via pnpm (latest as of April 2026)Context
This was encountered during the INHERIT open estate data standard's v2→v3 migration. The affected schema (
asset.json) usesallOf+if/thencomposition referencing 5 category sub-schemas — it's the most complex schema in the library, which may be relevant to reproduction.The issue may be related to internal caching of metaschema resolution during a single
jsonschema testrun, where earlier resolved schemas (which pass) establish a resolution context that persists for later schemas.Workaround
Not yet found — clearing
node_modules/.cachedid not help. The schema files themselves are verified correct.