Commit 2db9c58
committed
Update the Draft 3 and 4 metaschemas.
For draft 4 this pulls in upstream fixes which were not present locally,
notably fixing `id` to not have `format: uri` in it, because location
independent identifiers are indeed not URIs (they're URI references as
later metaschemas use).
For enum, on draft 3 and 4, this also *re-adds* constraints that enum
items MUST be unique and the array non-empty. In later drafts, this
restriction was loosened (see
json-schema-org/json-schema-spec@cf0ec72)
as well as json-schema-org/json-schema-spec#717 (comment)
but in drafts 3 and 4 it is present.
The draft 4 metaschema contains these assertions, the draft 3 one is
still buggy and does not, so they're just applied locally here.
Ref: json-schema-org/json-schema-spec#3101 parent f40199d commit 2db9c58
File tree
3 files changed
+31
-18
lines changed- jsonschema
- schemas
- tests
3 files changed
+31
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | 78 | | |
84 | 79 | | |
85 | 80 | | |
| |||
112 | 107 | | |
113 | 108 | | |
114 | 109 | | |
115 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
116 | 113 | | |
117 | 114 | | |
118 | 115 | | |
| |||
153 | 150 | | |
154 | 151 | | |
155 | 152 | | |
156 | | - | |
157 | | - | |
| 153 | + | |
158 | 154 | | |
159 | 155 | | |
160 | 156 | | |
161 | | - | |
162 | | - | |
| 157 | + | |
163 | 158 | | |
164 | 159 | | |
165 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | | - | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
122 | 120 | | |
123 | 121 | | |
124 | 122 | | |
125 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1453 | 1453 | | |
1454 | 1454 | | |
1455 | 1455 | | |
| 1456 | + | |
| 1457 | + | |
1456 | 1458 | | |
1457 | 1459 | | |
1458 | | - | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
1459 | 1468 | | |
1460 | 1469 | | |
1461 | 1470 | | |
1462 | 1471 | | |
1463 | 1472 | | |
| 1473 | + | |
| 1474 | + | |
1464 | 1475 | | |
1465 | 1476 | | |
1466 | | - | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
1467 | 1485 | | |
1468 | 1486 | | |
1469 | 1487 | | |
| |||
0 commit comments