Debian Codegraph @

t/additional-tests-draft2019-09/faux-buggy-schemas.json

raw
1 [
2 {
3 "description": "identifiers in non-schemas that look like schemas",
4 "schema": {
5 "$id": "http://localhost:1234/faux.json",
6 "anyOf": [
7 {
8 "type": "integer",
9 "examples": [
10 { "$id": "faux.json#/foo/bar" },
11 { "$anchor": "my$foo" }
12 ]
13 },
14 {
15 "type": "integer",
16 "default": { "$anchor": "not$an$anchor" }
17 },
18 {
19 "$anchor": "my_const",
20 "const": { "$anchor": "my_const" }
21 },
22 {
23 "$id": "enum.json",
24 "$anchor": "my_enum",
25 "enum": [
26 { "$id": "enum.json" },
27 { "$anchor": "my_enum" }
28 ]
29 }
30 ]
31 },
32 "tests": [
33 {
34 "description": "match the type checks",
35 "data": 1,
36 "valid": true
37 },
38 {
39 "description": "match none of the options",
40 "data": "a string",
41 "valid": false
42 }
43 ]
44 }
45 ]