Debian Codegraph @

ajv-formats/tests/extras/$data/formatMinimum.json

raw symbols SCIP
1 [
2 {
3 "description": "formatMinimum in the property",
4 "schema": {
5 "type": "object",
6 "properties": {
7 "finalDate": {
8 "type": "string",
9 "format": "date",
10 "formatMinimum": {"$data": "1/laterThan"}
11 },
12 "laterThan": {}
13 }
14 },
15 "tests": [
16 {
17 "description": "before the minimum date is invalid",
18 "data": {
19 "finalDate": "2014-12-03",
20 "laterThan": "2015-08-17"
21 },
22 "valid": false
23 },
24 {
25 "description": "boundary point is valid",
26 "data": {
27 "finalDate": "2015-08-17",
28 "laterThan": "2015-08-17"
29 },
30 "valid": true
31 },
32 {
33 "description": "after the minimum date is valid",
34 "data": {
35 "finalDate": "2015-11-09",
36 "laterThan": "2015-08-17"
37 },
38 "valid": true
39 },
40 {
41 "description": "fails if value of formatMinimum is not string",
42 "data": {
43 "finalDate": "2016-11-09",
44 "laterThan": 2015
45 },
46 "valid": false
47 }
48 ]
49 },
50 {
51 "description": "formatMinimum in the property with formatExclusiveMinimum",
52 "schema": {
53 "type": "object",
54 "properties": {
55 "finalDate": {
56 "type": "string",
57 "format": "date",
58 "formatExclusiveMinimum": {"$data": "1/laterThan"}
59 },
60 "laterThan": {}
61 }
62 },
63 "tests": [
64 {
65 "description": "before the minimum date is still invalid",
66 "data": {
67 "finalDate": "2014-12-03",
68 "laterThan": "2015-08-17"
69 },
70 "valid": false
71 },
72 {
73 "description": "boundary point is invalid",
74 "data": {
75 "finalDate": "2015-08-17",
76 "laterThan": "2015-08-17"
77 },
78 "valid": false
79 },
80 {
81 "description": "after the minimum date is still valid",
82 "data": {
83 "finalDate": "2015-11-09",
84 "laterThan": "2015-08-17"
85 },
86 "valid": true
87 }
88 ]
89 },
90
91 {
92 "description": "formatMinimum with format in the property",
93 "schema": {
94 "type": "object",
95 "properties": {
96 "when": {
97 "type": "string",
98 "format": {"$data": "1/whenFormat"},
99 "formatMinimum": "2015-08-17"
100 },
101 "whenFormat": {}
102 }
103 },
104 "tests": [
105 {
106 "description": "before the minimum date is invalid",
107 "data": {
108 "when": "2014-12-03",
109 "whenFormat": "date"
110 },
111 "valid": false
112 },
113 {
114 "description": "boundary point is valid",
115 "data": {
116 "when": "2015-08-17",
117 "whenFormat": "date"
118 },
119 "valid": true
120 },
121 {
122 "description": "after the minimum date is valid",
123 "data": {
124 "when": "2015-11-09",
125 "whenFormat": "date"
126 },
127 "valid": true
128 }
129 ]
130 },
131 {
132 "description": "formatMinimum with format in the property and with formatExclusiveMinimum",
133 "schema": {
134 "type": "object",
135 "properties": {
136 "when": {
137 "type": "string",
138 "format": {"$data": "1/whenFormat"},
139 "formatExclusiveMinimum": "2015-08-17"
140 },
141 "whenFormat": {}
142 }
143 },
144 "tests": [
145 {
146 "description": "before the minimum date is still invalid",
147 "data": {
148 "when": "2014-12-03",
149 "whenFormat": "date"
150 },
151 "valid": false
152 },
153 {
154 "description": "boundary point is invalid",
155 "data": {
156 "when": "2015-08-17",
157 "whenFormat": "date"
158 },
159 "valid": false
160 },
161 {
162 "description": "after the minimum date is still valid",
163 "data": {
164 "when": "2015-11-09",
165 "whenFormat": "date"
166 },
167 "valid": true
168 }
169 ]
170 },
171
172 {
173 "description": "formatMinimum and format in the properties",
174 "schema": {
175 "type": "object",
176 "properties": {
177 "when": {
178 "type": "string",
179 "format": {"$data": "1/whenFormat"},
180 "formatMinimum": {"$data": "1/laterThan"}
181 },
182 "whenFormat": {},
183 "laterThan": {}
184 }
185 },
186 "tests": [
187 {
188 "description": "before the minimum date is invalid",
189 "data": {
190 "when": "2014-12-03",
191 "whenFormat": "date",
192 "laterThan": "2015-08-17"
193 },
194 "valid": false
195 },
196 {
197 "description": "boundary point is valid",
198 "data": {
199 "when": "2015-08-17",
200 "whenFormat": "date",
201 "laterThan": "2015-08-17"
202 },
203 "valid": true
204 },
205 {
206 "description": "after the minimum date is valid",
207 "data": {
208 "when": "2015-11-09",
209 "whenFormat": "date",
210 "laterThan": "2015-08-17"
211 },
212 "valid": true
213 }
214 ]
215 },
216 {
217 "description": "formatMinimum and format in the properties with formatExclusiveMinimum",
218 "schema": {
219 "type": "object",
220 "properties": {
221 "when": {
222 "type": "string",
223 "format": {"$data": "1/whenFormat"},
224 "formatExclusiveMinimum": {"$data": "1/laterThan"}
225 },
226 "whenFormat": {},
227 "laterThan": {}
228 }
229 },
230 "tests": [
231 {
232 "description": "before the minimum date is still invalid",
233 "data": {
234 "when": "2014-12-03",
235 "whenFormat": "date",
236 "laterThan": "2015-08-17"
237 },
238 "valid": false
239 },
240 {
241 "description": "boundary point is invalid",
242 "data": {
243 "when": "2015-08-17",
244 "whenFormat": "date",
245 "laterThan": "2015-08-17"
246 },
247 "valid": false
248 },
249 {
250 "description": "after the minimum date is still valid",
251 "data": {
252 "when": "2015-11-09",
253 "whenFormat": "date",
254 "laterThan": "2015-08-17"
255 },
256 "valid": true
257 }
258 ]
259 },
260
261 {
262 "description": "formatExclusiveMinimum in the properties",
263 "schema": {
264 "properties": {
265 "finalDate": {
266 "format": "date",
267 "formatExclusiveMinimum": {"$data": "1/laterThan"}
268 },
269 "laterThan": {}
270 }
271 },
272 "tests": [
273 {
274 "description": "before the minimum date is invalid",
275 "data": {
276 "finalDate": "2014-12-03",
277 "laterThan": "2015-08-17"
278 },
279 "valid": false
280 },
281 {
282 "description": "boundary point is invalid",
283 "data": {
284 "finalDate": "2015-08-17",
285 "laterThan": "2015-08-17"
286 },
287 "valid": false
288 },
289 {
290 "description": "after the minimum date is valid",
291 "data": {
292 "finalDate": "2015-11-09",
293 "laterThan": "2015-08-17"
294 },
295 "valid": true
296 },
297 {
298 "description": "fails if value of formatExclusiveMinimum is not string",
299 "data": {
300 "finalDate": "2015-11-09",
301 "laterThan": 2015
302 },
303 "valid": false
304 }
305 ]
306 },
307
308 {
309 "description": "format and formatExclusiveMinimum in the properties",
310 "schema": {
311 "properties": {
312 "when": {
313 "format": {"$data": "1/whenFormat"},
314 "formatExclusiveMinimum": {"$data": "1/laterThan"}
315 },
316 "laterThan": {},
317 "whenFormat": {}
318 }
319 },
320 "tests": [
321 {
322 "description": "before the minimum date is invalid",
323 "data": {
324 "when": "2014-12-03",
325 "whenFormat": "date",
326 "laterThan": "2015-08-17"
327 },
328 "valid": false
329 },
330 {
331 "description": "boundary point is invalid",
332 "data": {
333 "when": "2015-08-17",
334 "whenFormat": "date",
335 "laterThan": "2015-08-17"
336 },
337 "valid": false
338 },
339 {
340 "description": "after the minimum date is valid",
341 "data": {
342 "when": "2015-11-09",
343 "whenFormat": "date",
344 "laterThan": "2015-08-17"
345 },
346 "valid": true
347 },
348 {
349 "description": "fails if value of formatExclusiveMinimum is not string",
350 "data": {
351 "when": "2015-11-09",
352 "whenFormat": "date",
353 "laterThan": 2015
354 },
355 "valid": false
356 }
357 ]
358 }
359 ]