...
1[
2 {
3 "description": "Location-independent identifier",
4 "schema": {
5 "allOf": [{
6 "$ref": "#foo"
7 }],
8 "$defs": {
9 "A": {
10 "$anchor": "foo",
11 "type": "integer"
12 }
13 }
14 },
15 "tests": [
16 {
17 "data": 1,
18 "description": "match",
19 "valid": true
20 },
21 {
22 "data": "a",
23 "description": "mismatch",
24 "valid": false
25 }
26 ]
27 },
28 {
29 "description": "Location-independent identifier with absolute URI",
30 "schema": {
31 "allOf": [{
32 "$ref": "http://localhost:1234/bar#foo"
33 }],
34 "$defs": {
35 "A": {
36 "$id": "http://localhost:1234/bar",
37 "$anchor": "foo",
38 "type": "integer"
39 }
40 }
41 },
42 "tests": [
43 {
44 "data": 1,
45 "description": "match",
46 "valid": true
47 },
48 {
49 "data": "a",
50 "description": "mismatch",
51 "valid": false
52 }
53 ]
54 },
55 {
56 "description": "Location-independent identifier with base URI change in subschema",
57 "schema": {
58 "$id": "http://localhost:1234/root",
59 "allOf": [{
60 "$ref": "http://localhost:1234/nested.json#foo"
61 }],
62 "$defs": {
63 "A": {
64 "$id": "nested.json",
65 "$defs": {
66 "B": {
67 "$anchor": "foo",
68 "type": "integer"
69 }
70 }
71 }
72 }
73 },
74 "tests": [
75 {
76 "data": 1,
77 "description": "match",
78 "valid": true
79 },
80 {
81 "data": "a",
82 "description": "mismatch",
83 "valid": false
84 }
85 ]
86 }
87]
View as plain text