Commit 4414601
committed
Always enable metaschema format checking
In the implementation prior to this change, passing
`--disable-formats` would impact not only the "actual" schema
validator, but also the validator built to evaluate the schema against
its metaschema. As a result, `--disable-formats *` and similar would
enable schemas to run which previously should have been caught as
invalid.
Furthermore, the customized format checker which had extensions for
date and time evaluation added was used, and any other customizations
to format checking would implicitly be shared with the metaschema
check.
To resolve, refactor format checker building to allow it to be used
more directly for the metaschema check, and add test cases to confirm
that a bad regex in a `pattern` is always rejected, even when
`--disable-formats regex` or similar is used.1 parent cc12d98 commit 4414601
File tree
3 files changed
+51
-22
lines changed- src/check_jsonschema
- formats
- schema_loader
- tests/acceptance
3 files changed
+51
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 69 | + | |
| 70 | + | |
72 | 71 | | |
73 | | - | |
74 | | - | |
75 | | - | |
| 72 | + | |
76 | 73 | | |
77 | 74 | | |
78 | 75 | | |
| |||
83 | 80 | | |
84 | 81 | | |
85 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 156 | + | |
160 | 157 | | |
161 | 158 | | |
162 | 159 | | |
| |||
170 | 167 | | |
171 | 168 | | |
172 | 169 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 170 | + | |
| 171 | + | |
179 | 172 | | |
180 | 173 | | |
181 | 174 | | |
| |||
206 | 199 | | |
207 | 200 | | |
208 | 201 | | |
209 | | - | |
210 | 202 | | |
211 | 203 | | |
212 | 204 | | |
213 | 205 | | |
| 206 | + | |
214 | 207 | | |
215 | 208 | | |
216 | 209 | | |
217 | 210 | | |
218 | 211 | | |
219 | 212 | | |
220 | 213 | | |
221 | | - | |
222 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
223 | 217 | | |
| 218 | + | |
224 | 219 | | |
225 | 220 | | |
226 | 221 | | |
227 | 222 | | |
228 | 223 | | |
229 | 224 | | |
230 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
231 | 236 | | |
232 | 237 | | |
233 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
38 | 50 | | |
39 | 51 | | |
40 | 52 | | |
41 | | - | |
| 53 | + | |
42 | 54 | | |
43 | 55 | | |
0 commit comments