UNPKG

node-blaze

Version:

Bindings to blaze, high-performance C++ JSON Schema validator

662 lines (661 loc) 16.2 kB
{ "$schema": "../test-suite.schema.json", "description": "The unevaluated vocabulary", "suite": [ { "description": "`unevaluatedProperties` alone", "compatibility": "2019", "schema": { "unevaluatedProperties": { "title": "Unevaluated" } }, "tests": [ { "instance": { "foo": 42, "bar": 24 }, "assertions": [ { "location": "/foo", "keyword": "title", "expected": { "#/unevaluatedProperties": "Unevaluated" } }, { "location": "/bar", "keyword": "title", "expected": { "#/unevaluatedProperties": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedProperties` with `properties`", "compatibility": "2019", "schema": { "properties": { "foo": { "title": "Evaluated" } }, "unevaluatedProperties": { "title": "Unevaluated" } }, "tests": [ { "instance": { "foo": 42, "bar": 24 }, "assertions": [ { "location": "/foo", "keyword": "title", "expected": { "#/properties/foo": "Evaluated" } }, { "location": "/bar", "keyword": "title", "expected": { "#/unevaluatedProperties": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedProperties` with `patternProperties`", "compatibility": "2019", "schema": { "patternProperties": { "^a": { "title": "Evaluated" } }, "unevaluatedProperties": { "title": "Unevaluated" } }, "tests": [ { "instance": { "apple": 42, "bar": 24 }, "assertions": [ { "location": "/apple", "keyword": "title", "expected": { "#/patternProperties/%5Ea": "Evaluated" } }, { "location": "/bar", "keyword": "title", "expected": { "#/unevaluatedProperties": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedProperties` with `additionalProperties`", "compatibility": "2019", "schema": { "additionalProperties": { "title": "Evaluated" }, "unevaluatedProperties": { "title": "Unevaluated" } }, "tests": [ { "instance": { "foo": 42, "bar": 24 }, "assertions": [ { "location": "/foo", "keyword": "title", "expected": { "#/additionalProperties": "Evaluated" } }, { "location": "/bar", "keyword": "title", "expected": { "#/additionalProperties": "Evaluated" } } ] } ] }, { "description": "`unevaluatedProperties` with `dependentSchemas`", "compatibility": "2019", "schema": { "dependentSchemas": { "foo": { "properties": { "bar": { "title": "Evaluated" } } } }, "unevaluatedProperties": { "title": "Unevaluated" } }, "tests": [ { "instance": { "foo": 42, "bar": 24 }, "assertions": [ { "location": "/foo", "keyword": "title", "expected": { "#/unevaluatedProperties": "Unevaluated" } }, { "location": "/bar", "keyword": "title", "expected": { "#/dependentSchemas/foo/properties/bar": "Evaluated" } } ] } ] }, { "description": "`unevaluatedProperties` with `if`, `then`, and `else`", "compatibility": "2019", "schema": { "if": { "properties": { "foo": { "type": "string", "title": "If" } } }, "then": { "properties": { "foo": { "title": "Then" } } }, "else": { "properties": { "foo": { "title": "Else" } } }, "unevaluatedProperties": { "title": "Unevaluated" } }, "tests": [ { "instance": { "foo": "", "bar": 42 }, "assertions": [ { "location": "/foo", "keyword": "title", "expected": { "#/then/properties/foo": "Then", "#/if/properties/foo": "If" } }, { "location": "/bar", "keyword": "title", "expected": { "#/unevaluatedProperties": "Unevaluated" } } ] }, { "instance": { "foo": 42, "bar": "" }, "assertions": [ { "location": "/foo", "keyword": "title", "expected": { "#/else/properties/foo": "Else" } }, { "location": "/bar", "keyword": "title", "expected": { "#/unevaluatedProperties": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedProperties` with `allOf`", "compatibility": "2019", "schema": { "allOf": [ { "properties": { "foo": { "title": "Evaluated" } } } ], "unevaluatedProperties": { "title": "Unevaluated" } }, "tests": [ { "instance": { "foo": 42, "bar": 24 }, "assertions": [ { "location": "/foo", "keyword": "title", "expected": { "#/allOf/0/properties/foo": "Evaluated" } }, { "location": "/bar", "keyword": "title", "expected": { "#/unevaluatedProperties": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedProperties` with `anyOf`", "compatibility": "2019", "schema": { "anyOf": [ { "properties": { "foo": { "title": "Evaluated" } } } ], "unevaluatedProperties": { "title": "Unevaluated" } }, "tests": [ { "instance": { "foo": 42, "bar": 24 }, "assertions": [ { "location": "/foo", "keyword": "title", "expected": { "#/anyOf/0/properties/foo": "Evaluated" } }, { "location": "/bar", "keyword": "title", "expected": { "#/unevaluatedProperties": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedProperties` with `oneOf`", "compatibility": "2019", "schema": { "oneOf": [ { "properties": { "foo": { "title": "Evaluated" } } } ], "unevaluatedProperties": { "title": "Unevaluated" } }, "tests": [ { "instance": { "foo": 42, "bar": 24 }, "assertions": [ { "location": "/foo", "keyword": "title", "expected": { "#/oneOf/0/properties/foo": "Evaluated" } }, { "location": "/bar", "keyword": "title", "expected": { "#/unevaluatedProperties": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedProperties` with `not`", "compatibility": "2019", "schema": { "not": { "not": { "properties": { "foo": { "title": "Evaluated" } } } }, "unevaluatedProperties": { "title": "Unevaluated" } }, "tests": [ { "instance": { "foo": 42, "bar": 24 }, "assertions": [ { "location": "/foo", "keyword": "title", "expected": { "#/unevaluatedProperties": "Unevaluated" } }, { "location": "/bar", "keyword": "title", "expected": { "#/unevaluatedProperties": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedItems` alone", "compatibility": "2019", "schema": { "unevaluatedItems": { "title": "Unevaluated" } }, "tests": [ { "instance": [42, 24], "assertions": [ { "location": "/0", "keyword": "title", "expected": { "#/unevaluatedItems": "Unevaluated" } }, { "location": "/1", "keyword": "title", "expected": { "#/unevaluatedItems": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedItems` with `prefixItems`", "compatibility": "2020", "schema": { "prefixItems": [{ "title": "Evaluated" }], "unevaluatedItems": { "title": "Unevaluated" } }, "tests": [ { "instance": [42, 24], "assertions": [ { "location": "/0", "keyword": "title", "expected": { "#/prefixItems/0": "Evaluated" } }, { "location": "/1", "keyword": "title", "expected": { "#/unevaluatedItems": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedItems` with `contains`", "compatibility": "2020", "schema": { "contains": { "type": "string", "title": "Evaluated" }, "unevaluatedItems": { "title": "Unevaluated" } }, "tests": [ { "instance": ["foo", 42], "assertions": [ { "location": "/0", "keyword": "title", "expected": { "#/contains": "Evaluated" } }, { "location": "/1", "keyword": "title", "expected": { "#/unevaluatedItems": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedItems` with `if`, `then`, and `else`", "compatibility": "2020", "schema": { "if": { "prefixItems": [ { "type": "string", "title": "If" } ] }, "then": { "prefixItems": [ { "title": "Then" } ] }, "else": { "prefixItems": [ { "title": "Else" } ] }, "unevaluatedItems": { "title": "Unevaluated" } }, "tests": [ { "instance": ["", 42], "assertions": [ { "location": "/0", "keyword": "title", "expected": { "#/then/prefixItems/0": "Then", "#/if/prefixItems/0": "If" } }, { "location": "/1", "keyword": "title", "expected": { "#/unevaluatedItems": "Unevaluated" } } ] }, { "instance": [42, ""], "assertions": [ { "location": "/0", "keyword": "title", "expected": { "#/else/prefixItems/0": "Else" } }, { "location": "/1", "keyword": "title", "expected": { "#/unevaluatedItems": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedItems` with `allOf`", "compatibility": "2020", "schema": { "allOf": [ { "prefixItems": [ { "title": "Evaluated" } ] } ], "unevaluatedItems": { "title": "Unevaluated" } }, "tests": [ { "instance": [42, 24], "assertions": [ { "location": "/0", "keyword": "title", "expected": { "#/allOf/0/prefixItems/0": "Evaluated" } }, { "location": "/1", "keyword": "title", "expected": { "#/unevaluatedItems": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedItems` with `anyOf`", "compatibility": "2020", "schema": { "anyOf": [ { "prefixItems": [ { "title": "Evaluated" } ] } ], "unevaluatedItems": { "title": "Unevaluated" } }, "tests": [ { "instance": [42, 24], "assertions": [ { "location": "/0", "keyword": "title", "expected": { "#/anyOf/0/prefixItems/0": "Evaluated" } }, { "location": "/1", "keyword": "title", "expected": { "#/unevaluatedItems": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedItems` with `oneOf`", "compatibility": "2020", "schema": { "oneOf": [ { "prefixItems": [ { "title": "Evaluated" } ] } ], "unevaluatedItems": { "title": "Unevaluated" } }, "tests": [ { "instance": [42, 24], "assertions": [ { "location": "/0", "keyword": "title", "expected": { "#/oneOf/0/prefixItems/0": "Evaluated" } }, { "location": "/1", "keyword": "title", "expected": { "#/unevaluatedItems": "Unevaluated" } } ] } ] }, { "description": "`unevaluatedItems` with `not`", "compatibility": "2020", "schema": { "not": { "not": { "prefixItems": [ { "title": "Evaluated" } ] } }, "unevaluatedItems": { "title": "Unevaluated" } }, "tests": [ { "instance": [42, 24], "assertions": [ { "location": "/0", "keyword": "title", "expected": { "#/unevaluatedItems": "Unevaluated" } }, { "location": "/1", "keyword": "title", "expected": { "#/unevaluatedItems": "Unevaluated" } } ] } ] } ] }