UNPKG

node-blaze

Version:

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

120 lines (119 loc) 2.73 kB
{ "$schema": "../test-suite.schema.json", "description": "The content vocabulary", "suite": [ { "description": "`contentMediaType` is an annotation for string instances", "compatibility": "7", "schema": { "contentMediaType": "application/json" }, "tests": [ { "instance": "{ \"foo\": \"bar\" }", "assertions": [ { "location": "", "keyword": "contentMediaType", "expected": { "#": "application/json" } } ] }, { "instance": 42, "assertions": [ { "location": "", "keyword": "contentMediaType", "expected": {} } ] } ] }, { "description": "`contentEncoding` is an annotation for string instances", "compatibility": "7", "schema": { "contentEncoding": "base64" }, "tests": [ { "instance": "SGVsbG8gZnJvbSBKU09OIFNjaGVtYQ==", "assertions": [ { "location": "", "keyword": "contentEncoding", "expected": { "#": "base64" } } ] }, { "instance": 42, "assertions": [ { "location": "", "keyword": "contentEncoding", "expected": {} } ] } ] }, { "description": "`contentSchema` is an annotation for string instances", "compatibility": "2019", "schema": { "contentMediaType": "application/json", "contentSchema": { "type": "number" } }, "tests": [ { "instance": "42", "assertions": [ { "location": "", "keyword": "contentSchema", "expected": { "#": { "type": "number" } } } ] }, { "instance": 42, "assertions": [ { "location": "", "keyword": "contentSchema", "expected": {} } ] } ] }, { "description": "`contentSchema` requires `contentMediaType`", "compatibility": "2019", "schema": { "contentSchema": { "type": "number" } }, "tests": [ { "instance": "42", "assertions": [ { "location": "", "keyword": "contentSchema", "expected": {} } ] } ] } ] }