Skip to content

Commit cf88638

Browse files
committed
Squashed 'json/' changes from 20c1bb1d9..54440eab4
54440eab4 Merge pull request #516 from ChALkeR/chalker/ipv6 e7b22e1c6 Fix the sanity check by pinning. 8891d8107 Merge pull request #519 from json-schema-org/ether/custom-dialect 5f5fccda3 test the format-assertion vocabulary with a custom metaschema 3fcee3868 Merge pull request #512 from json-schema-org/ether/formats-and-non-strings b349b8797 test that format-assertions are valid with non-string types 8e5b2f10d fix needless inconsistencies in format tests between drafts 02d7cb59a Correct "ref with sibling id" tests 1649470ba More ipv6 tests to increase coverage 7334b4c7e Merge pull request #505 from ChALkeR/chalker/fix-unicode 0fb2d2787 Consolidate optional/unicode into optional/ecmascript-regex 4f8c6d7bf unevaluatedProperties: deep dynamic + refs 9103f3b6f $ref wit id does not test what it is indented to do f300dd15f Add test "same $anchor with different base uri" d128f9d7f Add test to check that $id resolved against nearest parent, not just immediate parent 72e31dd20 Merge pull request #515 from json-schema-org/ether/fix-mandatory-format-tests 0173a0835 Revert "by default, "format" only annotates, not validates" 66e813a90 Merge pull request #506 from json-schema-org/ether/formats-non-ascii 9430972bc fix unicode tests in accordance to pattern/patternProperties spec git-subtree-dir: json git-subtree-split: 54440eab4d50b80a62cc9f9c561e306cdbb19591
1 parent b5e545b commit cf88638

File tree

129 files changed

+5355
-1289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+5355
-1289
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$id": "http://localhost:1234/draft2020-12/format-assertion-false.json",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2020-12/vocab/core": true,
6+
"https://json-schema.org/draft/2020-12/vocab/format-assertion": false
7+
},
8+
"allOf": [
9+
{ "$ref": "https://json-schema.org/draft/2020-12/schema/meta/core" },
10+
{ "$ref": "https://json-schema.org/draft/2020-12/schema/meta/format-assertion" }
11+
]
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$id": "http://localhost:1234/draft2020-12/format-assertion-true.json",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"$vocabulary": {
5+
"https://json-schema.org/draft/2020-12/vocab/core": true,
6+
"https://json-schema.org/draft/2020-12/vocab/format-assertion": true
7+
},
8+
"allOf": [
9+
{ "$ref": "https://json-schema.org/draft/2020-12/schema/meta/core" },
10+
{ "$ref": "https://json-schema.org/draft/2020-12/schema/meta/format-assertion" }
11+
]
12+
}

tests/draft-future/anchor.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,40 @@
134134
"valid": false
135135
}
136136
]
137+
},
138+
{
139+
"description": "same $anchor with different base uri",
140+
"schema": {
141+
"$id": "http://localhost:1234/foobar",
142+
"$defs": {
143+
"A": {
144+
"$id": "child1",
145+
"allOf": [
146+
{
147+
"$id": "child2",
148+
"$anchor": "my_anchor",
149+
"type": "number"
150+
},
151+
{
152+
"$anchor": "my_anchor",
153+
"type": "string"
154+
}
155+
]
156+
}
157+
},
158+
"$ref": "child1#my_anchor"
159+
},
160+
"tests": [
161+
{
162+
"description": "$ref should resolve to /$defs/A/allOf/1",
163+
"data": "a",
164+
"valid": true
165+
},
166+
{
167+
"description": "$ref should not resolve to /$defs/A/allOf/0",
168+
"data": 1,
169+
"valid": false
170+
}
171+
]
137172
}
138173
]

tests/draft-future/format.json

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@
3232
"description": "all string formats ignore nulls",
3333
"data": null,
3434
"valid": true
35-
},
36-
{
37-
"description": "invalid email string is only an annotation by default",
38-
"data": "2962",
39-
"valid": true
4035
}
4136
]
4237
},
@@ -73,11 +68,6 @@
7368
"description": "all string formats ignore nulls",
7469
"data": null,
7570
"valid": true
76-
},
77-
{
78-
"description": "invalid idn-email string is only an annotation by default",
79-
"data": "2962",
80-
"valid": true
8171
}
8272
]
8373
},
@@ -114,11 +104,6 @@
114104
"description": "all string formats ignore nulls",
115105
"data": null,
116106
"valid": true
117-
},
118-
{
119-
"description": "invalid regex string is only an annotation by default",
120-
"data": "^(abc]",
121-
"valid": true
122107
}
123108
]
124109
},
@@ -155,11 +140,6 @@
155140
"description": "all string formats ignore nulls",
156141
"data": null,
157142
"valid": true
158-
},
159-
{
160-
"description": "invalid ipv4 string is only an annotation by default",
161-
"data": "127.0.0.0.1",
162-
"valid": true
163143
}
164144
]
165145
},
@@ -196,11 +176,6 @@
196176
"description": "all string formats ignore nulls",
197177
"data": null,
198178
"valid": true
199-
},
200-
{
201-
"description": "invalid ipv6 string is only an annotation by default",
202-
"data": "12345::",
203-
"valid": true
204179
}
205180
]
206181
},
@@ -237,11 +212,6 @@
237212
"description": "all string formats ignore nulls",
238213
"data": null,
239214
"valid": true
240-
},
241-
{
242-
"description": "invalid idn-hostname string is only an annotation by default",
243-
"data": "〮실례.테스트",
244-
"valid": true
245215
}
246216
]
247217
},
@@ -278,11 +248,6 @@
278248
"description": "all string formats ignore nulls",
279249
"data": null,
280250
"valid": true
281-
},
282-
{
283-
"description": "invalid hostname string is only an annotation by default",
284-
"data": "-a-host-name-that-starts-with--",
285-
"valid": true
286251
}
287252
]
288253
},
@@ -319,11 +284,6 @@
319284
"description": "all string formats ignore nulls",
320285
"data": null,
321286
"valid": true
322-
},
323-
{
324-
"description": "invalid date string is only an annotation by default",
325-
"data": "06/19/1963",
326-
"valid": true
327287
}
328288
]
329289
},
@@ -360,11 +320,6 @@
360320
"description": "all string formats ignore nulls",
361321
"data": null,
362322
"valid": true
363-
},
364-
{
365-
"description": "invalid date-time string is only an annotation by default",
366-
"data": "1990-02-31T15:59:60.123-08:00",
367-
"valid": true
368323
}
369324
]
370325
},
@@ -401,11 +356,6 @@
401356
"description": "all string formats ignore nulls",
402357
"data": null,
403358
"valid": true
404-
},
405-
{
406-
"description": "invalid time string is only an annotation by default",
407-
"data": "08:30:06 PST",
408-
"valid": true
409359
}
410360
]
411361
},
@@ -442,11 +392,6 @@
442392
"description": "all string formats ignore nulls",
443393
"data": null,
444394
"valid": true
445-
},
446-
{
447-
"description": "invalid json-pointer string is only an annotation by default",
448-
"data": "/foo/bar~",
449-
"valid": true
450395
}
451396
]
452397
},
@@ -483,11 +428,6 @@
483428
"description": "all string formats ignore nulls",
484429
"data": null,
485430
"valid": true
486-
},
487-
{
488-
"description": "invalid relative-json-pointer string is only an annotation by default",
489-
"data": "/foo/bar",
490-
"valid": true
491431
}
492432
]
493433
},
@@ -524,11 +464,6 @@
524464
"description": "all string formats ignore nulls",
525465
"data": null,
526466
"valid": true
527-
},
528-
{
529-
"description": "invalid iri string is only an annotation by default",
530-
"data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334",
531-
"valid": true
532467
}
533468
]
534469
},
@@ -565,11 +500,6 @@
565500
"description": "all string formats ignore nulls",
566501
"data": null,
567502
"valid": true
568-
},
569-
{
570-
"description": "invalid iri-reference string is only an annotation by default",
571-
"data": "\\\\WINDOWS\\filëßåré",
572-
"valid": true
573503
}
574504
]
575505
},
@@ -606,11 +536,6 @@
606536
"description": "all string formats ignore nulls",
607537
"data": null,
608538
"valid": true
609-
},
610-
{
611-
"description": "invalid uri string is only an annotation by default",
612-
"data": "//foo.bar/?baz=qux#quux",
613-
"valid": true
614539
}
615540
]
616541
},
@@ -647,11 +572,6 @@
647572
"description": "all string formats ignore nulls",
648573
"data": null,
649574
"valid": true
650-
},
651-
{
652-
"description": "invalid uri-reference string is only an annotation by default",
653-
"data": "\\\\WINDOWS\\fileshare",
654-
"valid": true
655575
}
656576
]
657577
},
@@ -688,11 +608,6 @@
688608
"description": "all string formats ignore nulls",
689609
"data": null,
690610
"valid": true
691-
},
692-
{
693-
"description": "invalid uri-template string is only an annotation by default",
694-
"data": "http://example.com/dictionary/{term:1}/{term",
695-
"valid": true
696611
}
697612
]
698613
},
@@ -729,11 +644,6 @@
729644
"description": "all string formats ignore nulls",
730645
"data": null,
731646
"valid": true
732-
},
733-
{
734-
"description": "invalid uuid string is only an annotation by default",
735-
"data": "2eb8aa08-aa98-11ea-b4aa-73b441d1638",
736-
"valid": true
737647
}
738648
]
739649
},
@@ -770,11 +680,6 @@
770680
"description": "all string formats ignore nulls",
771681
"data": null,
772682
"valid": true
773-
},
774-
{
775-
"description": "invalid duration string is only an annotation by default",
776-
"data": "PT1D",
777-
"valid": true
778683
}
779684
]
780685
}

0 commit comments

Comments
 (0)