Skip to content

Commit 0b87f43

Browse files
committed
Specification
1 parent 8e67c95 commit 0b87f43

15 files changed

Lines changed: 370 additions & 0 deletions

File tree

test/jsonschema/cases/draft2019-09/minProperties.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@
4040
"description": "ignores other non-objects",
4141
"data": 12,
4242
"valid": true
43+
},
44+
{
45+
"description": "ignores null",
46+
"data": null,
47+
"valid": true
48+
},
49+
{
50+
"description": "ignores booleans",
51+
"data": true,
52+
"valid": true
4353
}
4454
]
4555
},

test/jsonschema/cases/draft2019-09/optional/format/date.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,71 @@
273273
"comment": "https://www.rfc-editor.org/rfc/rfc3339#section-5.6 — date-mday = 2DIGIT ; 01-28/29/30/31",
274274
"data": "2024-01-00",
275275
"valid": false
276+
},
277+
{
278+
"description": "invalid: empty string",
279+
"data": "",
280+
"valid": false
281+
},
282+
{
283+
"description": "invalid: embedded whitespace between year and month",
284+
"data": "2020 -01-01",
285+
"valid": false
286+
},
287+
{
288+
"description": "invalid: trailing character after valid full-date",
289+
"data": "2020-01-01X",
290+
"valid": false
291+
},
292+
{
293+
"description": "invalid: trailing Z after full-date",
294+
"data": "2020-01-01Z",
295+
"valid": false
296+
},
297+
{
298+
"description": "invalid: full-date followed by space and time component",
299+
"data": "2020-01-01 00:00:00Z",
300+
"valid": false
301+
},
302+
{
303+
"description": "valid: four-digit year 0001",
304+
"data": "0001-01-01",
305+
"valid": true
306+
},
307+
{
308+
"description": "invalid: two-digit year (N-2 digits)",
309+
"data": "20-01-01",
310+
"valid": false
311+
},
312+
{
313+
"description": "invalid: three-digit year (N-1 digits)",
314+
"data": "998-01-01",
315+
"valid": false
316+
},
317+
{
318+
"description": "invalid: five-digit year (N+1 digits)",
319+
"data": "12020-01-01",
320+
"valid": false
321+
},
322+
{
323+
"description": "invalid: positive sign prefix on year",
324+
"data": "+2020-01-01",
325+
"valid": false
326+
},
327+
{
328+
"description": "invalid: negative sign prefix on year",
329+
"data": "-2020-01-01",
330+
"valid": false
331+
},
332+
{
333+
"description": "invalid: non-ASCII Bengali digit in year field",
334+
"data": "২020-01-01",
335+
"valid": false
336+
},
337+
{
338+
"description": "invalid: alphabetic characters in year field",
339+
"data": "YYYY-01-01",
340+
"valid": false
276341
}
277342
]
278343
}

test/jsonschema/cases/draft2019-09/propertyNames.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@
4848
"description": "ignores other non-objects",
4949
"data": 12,
5050
"valid": true
51+
},
52+
{
53+
"description": "ignores null",
54+
"data": null,
55+
"valid": true
56+
},
57+
{
58+
"description": "ignores booleans",
59+
"data": true,
60+
"valid": true
5161
}
5262
]
5363
},

test/jsonschema/cases/draft2020-12/minProperties.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@
4040
"description": "ignores other non-objects",
4141
"data": 12,
4242
"valid": true
43+
},
44+
{
45+
"description": "ignores null",
46+
"data": null,
47+
"valid": true
48+
},
49+
{
50+
"description": "ignores booleans",
51+
"data": true,
52+
"valid": true
4353
}
4454
]
4555
},

test/jsonschema/cases/draft2020-12/optional/format/date.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,71 @@
273273
"comment": "https://www.rfc-editor.org/rfc/rfc3339#section-5.6 — date-mday = 2DIGIT ; 01-28/29/30/31",
274274
"data": "2024-01-00",
275275
"valid": false
276+
},
277+
{
278+
"description": "invalid: empty string",
279+
"data": "",
280+
"valid": false
281+
},
282+
{
283+
"description": "invalid: embedded whitespace between year and month",
284+
"data": "2020 -01-01",
285+
"valid": false
286+
},
287+
{
288+
"description": "invalid: trailing character after valid full-date",
289+
"data": "2020-01-01X",
290+
"valid": false
291+
},
292+
{
293+
"description": "invalid: trailing Z after full-date",
294+
"data": "2020-01-01Z",
295+
"valid": false
296+
},
297+
{
298+
"description": "invalid: full-date followed by space and time component",
299+
"data": "2020-01-01 00:00:00Z",
300+
"valid": false
301+
},
302+
{
303+
"description": "valid: four-digit year 0001",
304+
"data": "0001-01-01",
305+
"valid": true
306+
},
307+
{
308+
"description": "invalid: two-digit year (N-2 digits)",
309+
"data": "20-01-01",
310+
"valid": false
311+
},
312+
{
313+
"description": "invalid: three-digit year (N-1 digits)",
314+
"data": "998-01-01",
315+
"valid": false
316+
},
317+
{
318+
"description": "invalid: five-digit year (N+1 digits)",
319+
"data": "12020-01-01",
320+
"valid": false
321+
},
322+
{
323+
"description": "invalid: positive sign prefix on year",
324+
"data": "+2020-01-01",
325+
"valid": false
326+
},
327+
{
328+
"description": "invalid: negative sign prefix on year",
329+
"data": "-2020-01-01",
330+
"valid": false
331+
},
332+
{
333+
"description": "invalid: non-ASCII Bengali digit in year field",
334+
"data": "২020-01-01",
335+
"valid": false
336+
},
337+
{
338+
"description": "invalid: alphabetic characters in year field",
339+
"data": "YYYY-01-01",
340+
"valid": false
276341
}
277342
]
278343
}

test/jsonschema/cases/draft2020-12/propertyNames.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@
4848
"description": "ignores other non-objects",
4949
"data": 12,
5050
"valid": true
51+
},
52+
{
53+
"description": "ignores null",
54+
"data": null,
55+
"valid": true
56+
},
57+
{
58+
"description": "ignores booleans",
59+
"data": true,
60+
"valid": true
5161
}
5262
]
5363
},

test/jsonschema/cases/draft4/minProperties.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@
3939
"description": "ignores other non-objects",
4040
"data": 12,
4141
"valid": true
42+
},
43+
{
44+
"description": "ignores null",
45+
"data": null,
46+
"valid": true
47+
},
48+
{
49+
"description": "ignores booleans",
50+
"data": true,
51+
"valid": true
4252
}
4353
]
4454
}

test/jsonschema/cases/draft6/minProperties.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@
3939
"description": "ignores other non-objects",
4040
"data": 12,
4141
"valid": true
42+
},
43+
{
44+
"description": "ignores null",
45+
"data": null,
46+
"valid": true
47+
},
48+
{
49+
"description": "ignores booleans",
50+
"data": true,
51+
"valid": true
4252
}
4353
]
4454
},

test/jsonschema/cases/draft6/propertyNames.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@
4747
"description": "ignores other non-objects",
4848
"data": 12,
4949
"valid": true
50+
},
51+
{
52+
"description": "ignores null",
53+
"data": null,
54+
"valid": true
55+
},
56+
{
57+
"description": "ignores booleans",
58+
"data": true,
59+
"valid": true
5060
}
5161
]
5262
},

test/jsonschema/cases/draft7/minProperties.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@
3939
"description": "ignores other non-objects",
4040
"data": 12,
4141
"valid": true
42+
},
43+
{
44+
"description": "ignores null",
45+
"data": null,
46+
"valid": true
47+
},
48+
{
49+
"description": "ignores booleans",
50+
"data": true,
51+
"valid": true
4252
}
4353
]
4454
},

0 commit comments

Comments
 (0)