Skip to content

Commit 36b0eb3

Browse files
committed
Add tests for tag URIs.
There's nothing special (or specified) about their behavior vis a vis JSON Schema (or referencing) in general -- they're normal URIs and therefore should be supported -- but because they're perhaps underused *and* potentially useful for this use case, we test for them specifically to ensure they're covered. Closes: #9
1 parent 0ba3ce7 commit 36b0eb3

File tree

5 files changed

+320
-0
lines changed

5 files changed

+320
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"$schema": "../../test-schema.json",
3+
"registry": {
4+
"tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": {
5+
"definitions": {
6+
"foo": {
7+
"id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
8+
"definitions": {
9+
"bar": {
10+
"id": "#baz",
11+
"quux": "eggs"
12+
}
13+
}
14+
}
15+
}
16+
}
17+
},
18+
"tests": [
19+
{
20+
"ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
21+
"target": {
22+
"id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
23+
"definitions": {
24+
"bar": {
25+
"id": "#baz",
26+
"quux": "eggs"
27+
}
28+
}
29+
},
30+
"then": {
31+
"ref": "#baz",
32+
"target": { "id": "#baz", "quux": "eggs" }
33+
}
34+
},
35+
{
36+
"ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id",
37+
"error": true,
38+
"why": {
39+
"summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.",
40+
"specifications": [
41+
{
42+
"rfc": 4151,
43+
"section": "2.2",
44+
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2"
45+
}
46+
]
47+
}
48+
},
49+
{
50+
"ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id",
51+
"error": true,
52+
"why": {
53+
"summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.",
54+
"specifications": [
55+
{
56+
"rfc": 4151,
57+
"section": "2.1",
58+
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1"
59+
}
60+
]
61+
}
62+
}
63+
]
64+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"$schema": "../../test-schema.json",
3+
"registry": {
4+
"tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": {
5+
"definitions": {
6+
"foo": {
7+
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
8+
"definitions": {
9+
"bar": {
10+
"$id": "#baz",
11+
"quux": "eggs"
12+
}
13+
}
14+
}
15+
}
16+
}
17+
},
18+
"tests": [
19+
{
20+
"ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
21+
"target": {
22+
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
23+
"definitions": {
24+
"bar": {
25+
"$id": "#baz",
26+
"quux": "eggs"
27+
}
28+
}
29+
},
30+
"then": {
31+
"ref": "#baz",
32+
"target": { "$id": "#baz", "quux": "eggs" }
33+
}
34+
},
35+
{
36+
"ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id",
37+
"error": true,
38+
"why": {
39+
"summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.",
40+
"specifications": [
41+
{
42+
"rfc": 4151,
43+
"section": "2.2",
44+
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2"
45+
}
46+
]
47+
}
48+
},
49+
{
50+
"ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id",
51+
"error": true,
52+
"why": {
53+
"summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.",
54+
"specifications": [
55+
{
56+
"rfc": 4151,
57+
"section": "2.1",
58+
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1"
59+
}
60+
]
61+
}
62+
}
63+
]
64+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"$schema": "../../test-schema.json",
3+
"registry": {
4+
"tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": {
5+
"definitions": {
6+
"foo": {
7+
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
8+
"definitions": {
9+
"bar": {
10+
"$id": "#baz",
11+
"quux": "eggs"
12+
}
13+
}
14+
}
15+
}
16+
}
17+
},
18+
"tests": [
19+
{
20+
"ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
21+
"target": {
22+
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
23+
"definitions": {
24+
"bar": {
25+
"$id": "#baz",
26+
"quux": "eggs"
27+
}
28+
}
29+
},
30+
"then": {
31+
"ref": "#baz",
32+
"target": { "$id": "#baz", "quux": "eggs" }
33+
}
34+
},
35+
{
36+
"ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id",
37+
"error": true,
38+
"why": {
39+
"summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.",
40+
"specifications": [
41+
{
42+
"rfc": 4151,
43+
"section": "2.2",
44+
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2"
45+
}
46+
]
47+
}
48+
},
49+
{
50+
"ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id",
51+
"error": true,
52+
"why": {
53+
"summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.",
54+
"specifications": [
55+
{
56+
"rfc": 4151,
57+
"section": "2.1",
58+
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1"
59+
}
60+
]
61+
}
62+
}
63+
]
64+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"$schema": "../../test-schema.json",
3+
"registry": {
4+
"tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": {
5+
"$defs": {
6+
"foo": {
7+
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
8+
"$defs": {
9+
"bar": {
10+
"$anchor": "baz",
11+
"quux": "eggs"
12+
}
13+
}
14+
}
15+
}
16+
}
17+
},
18+
"tests": [
19+
{
20+
"ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
21+
"target": {
22+
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
23+
"$defs": {
24+
"bar": {
25+
"$anchor": "baz",
26+
"quux": "eggs"
27+
}
28+
}
29+
},
30+
"then": {
31+
"ref": "#baz",
32+
"target": { "$anchor": "baz", "quux": "eggs" }
33+
}
34+
},
35+
{
36+
"ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id",
37+
"error": true,
38+
"why": {
39+
"summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.",
40+
"specifications": [
41+
{
42+
"rfc": 4151,
43+
"section": "2.2",
44+
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2"
45+
}
46+
]
47+
}
48+
},
49+
{
50+
"ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id",
51+
"error": true,
52+
"why": {
53+
"summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.",
54+
"specifications": [
55+
{
56+
"rfc": 4151,
57+
"section": "2.1",
58+
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1"
59+
}
60+
]
61+
}
62+
}
63+
]
64+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"$schema": "../../test-schema.json",
3+
"registry": {
4+
"tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": {
5+
"$defs": {
6+
"foo": {
7+
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
8+
"$defs": {
9+
"bar": {
10+
"$anchor": "baz",
11+
"quux": "eggs"
12+
}
13+
}
14+
}
15+
}
16+
}
17+
},
18+
"tests": [
19+
{
20+
"ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
21+
"target": {
22+
"$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id",
23+
"$defs": {
24+
"bar": {
25+
"$anchor": "baz",
26+
"quux": "eggs"
27+
}
28+
}
29+
},
30+
"then": {
31+
"ref": "#baz",
32+
"target": { "$anchor": "baz", "quux": "eggs" }
33+
}
34+
},
35+
{
36+
"ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id",
37+
"error": true,
38+
"why": {
39+
"summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.",
40+
"specifications": [
41+
{
42+
"rfc": 4151,
43+
"section": "2.2",
44+
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2"
45+
}
46+
]
47+
}
48+
},
49+
{
50+
"ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id",
51+
"error": true,
52+
"why": {
53+
"summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.",
54+
"specifications": [
55+
{
56+
"rfc": 4151,
57+
"section": "2.1",
58+
"link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1"
59+
}
60+
]
61+
}
62+
}
63+
]
64+
}

0 commit comments

Comments
 (0)