Skip to content

Commit 306c985

Browse files
committed
Add tests for the non-existing syntax mixing anchors and pointers.
Closes: #7
1 parent a83699f commit 306c985

File tree

5 files changed

+175
-0
lines changed

5 files changed

+175
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "../../test-schema.json",
3+
"registry": {
4+
"http://example.com/": {
5+
"definitions": {
6+
"foo": {
7+
"id": "#foo",
8+
"definitions": {
9+
"bar": { "baz": "quux" }
10+
}
11+
}
12+
}
13+
}
14+
},
15+
"tests": [
16+
{
17+
"base_uri": "http://example.com/",
18+
"ref": "#foo/definitions/bar",
19+
"error": true
20+
},
21+
{
22+
"base_uri": "http://example.com/",
23+
"ref": "#foo#/definitions/bar",
24+
"error": true
25+
},
26+
{
27+
"ref": "http://example.com/#foo/definitions/bar",
28+
"error": true
29+
},
30+
{
31+
"ref": "http://example.com#foo/definitions/bar",
32+
"error": true
33+
}
34+
]
35+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "../../test-schema.json",
3+
"registry": {
4+
"http://example.com/": {
5+
"definitions": {
6+
"foo": {
7+
"$id": "#foo",
8+
"definitions": {
9+
"bar": { "baz": "quux" }
10+
}
11+
}
12+
}
13+
}
14+
},
15+
"tests": [
16+
{
17+
"base_uri": "http://example.com/",
18+
"ref": "#foo/definitions/bar",
19+
"error": true
20+
},
21+
{
22+
"base_uri": "http://example.com/",
23+
"ref": "#foo#/definitions/bar",
24+
"error": true
25+
},
26+
{
27+
"ref": "http://example.com/#foo/definitions/bar",
28+
"error": true
29+
},
30+
{
31+
"ref": "http://example.com#foo/definitions/bar",
32+
"error": true
33+
}
34+
]
35+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "../../test-schema.json",
3+
"registry": {
4+
"http://example.com/": {
5+
"definitions": {
6+
"foo": {
7+
"$id": "#foo",
8+
"definitions": {
9+
"bar": { "baz": "quux" }
10+
}
11+
}
12+
}
13+
}
14+
},
15+
"tests": [
16+
{
17+
"base_uri": "http://example.com/",
18+
"ref": "#foo/definitions/bar",
19+
"error": true
20+
},
21+
{
22+
"base_uri": "http://example.com/",
23+
"ref": "#foo#/definitions/bar",
24+
"error": true
25+
},
26+
{
27+
"ref": "http://example.com/#foo/definitions/bar",
28+
"error": true
29+
},
30+
{
31+
"ref": "http://example.com#foo/definitions/bar",
32+
"error": true
33+
}
34+
]
35+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "../../test-schema.json",
3+
"registry": {
4+
"http://example.com/": {
5+
"$defs": {
6+
"foo": {
7+
"$anchor": "foo",
8+
"$defs": {
9+
"bar": { "baz": "quux" }
10+
}
11+
}
12+
}
13+
}
14+
},
15+
"tests": [
16+
{
17+
"base_uri": "http://example.com/",
18+
"ref": "#foo/$defs/bar",
19+
"error": true
20+
},
21+
{
22+
"base_uri": "http://example.com/",
23+
"ref": "#foo#/$defs/bar",
24+
"error": true
25+
},
26+
{
27+
"ref": "http://example.com/#foo/$defs/bar",
28+
"error": true
29+
},
30+
{
31+
"ref": "http://example.com#foo/$defs/bar",
32+
"error": true
33+
}
34+
]
35+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "../../test-schema.json",
3+
"registry": {
4+
"http://example.com/": {
5+
"$defs": {
6+
"foo": {
7+
"$anchor": "foo",
8+
"$defs": {
9+
"bar": { "baz": "quux" }
10+
}
11+
}
12+
}
13+
}
14+
},
15+
"tests": [
16+
{
17+
"base_uri": "http://example.com/",
18+
"ref": "#foo/$defs/bar",
19+
"error": true
20+
},
21+
{
22+
"base_uri": "http://example.com/",
23+
"ref": "#foo#/$defs/bar",
24+
"error": true
25+
},
26+
{
27+
"ref": "http://example.com/#foo/$defs/bar",
28+
"error": true
29+
},
30+
{
31+
"ref": "http://example.com#foo/$defs/bar",
32+
"error": true
33+
}
34+
]
35+
}

0 commit comments

Comments
 (0)