[ { "description": "valid $vocabulary", "schema": { "$id": "https://mymetaschema", "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/core": true, "https://foo.com": false } }, "tests": [ { "description": "a valid $vocabulary value", "data": 1, "valid": true } ] }, { "description": "invalid $vocabulary (wrong specification version), but not until we evaluate with this metaschema", "schema": { "$id": "https://mymetaschema2", "$vocabulary": { "https://json-schema.org/draft/2019-09/vocab/core": true } }, "tests": [ { "description": "invalid $vocabulary (wrong specification version): register this metaschema", "data": 1, "valid": true } ] }, { "description": "use schema (invalid $vocabulary) as a metaschema", "schema": { "$id": "https://mychema2", "$schema": "https://mymetaschema2" }, "tests": [ { "description": "invalid $vocabulary value: wrong specification version", "data": 1, "valid": false } ] }, { "description": "invalid $vocabulary (unknown URI), but not until we evaluate with this metaschema", "schema": { "$id": "https://mymetaschema3", "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/core": true, "https://foo.com": true } }, "tests": [ { "description": "invalid $vocabulary (unknown URI): register this metaschema", "data": 1, "valid": true } ] }, { "description": "use schema (unknown URI) as a metaschema", "schema": { "$id": "https://myschema3", "$schema": "https://mymetaschema3" }, "tests": [ { "description": "invalid $vocabulary value: unknown URI", "data": 1, "valid": false } ] }, { "description": "custom metaschema with format-assertion: false", "schema": { "$id": "https://mymetaschema4/with/format-assertion/false", "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/core": true, "https://json-schema.org/draft/2020-12/vocab/format-assertion": false } }, "tests": [ { "description": "custom metaschema is loaded", "data": 1, "valid": true } ] }, { "description": "custom metaschema with format-assertion: true", "schema": { "$id": "https://mymetaschema4/with/format-assertion/true", "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/core": true, "https://json-schema.org/draft/2020-12/vocab/format-assertion": true } }, "tests": [ { "description": "custom metaschema is loaded", "data": 1, "valid": true } ] }, { "description": "schema that uses custom metaschema with format-assertion: false", "schema": { "$id": "https://schema/using/format-assertion/false", "$schema": "https://mymetaschema4/with/format-assertion/false", "format": "ipv4" }, "tests": [ { "description": "format-assertion: false: valid string", "data": "127.0.0.1", "valid": true }, { "description": "format-assertion: false: invalid string", "data": "not-an-ipv4", "valid": false } ] }, { "description": "schema that uses custom metaschema with format-assertion: true", "schema": { "$id": "https://schema/using/format-assertion/true", "$schema": "https://mymetaschema4/with/format-assertion/true", "format": "ipv4" }, "tests": [ { "description": "format-assertion: true: valid string", "data": "127.0.0.1", "valid": true }, { "description": "format-assertion: true: invalid string", "data": "not-an-ipv4", "valid": false } ] } ]