|
49 | 49 | } |
50 | 50 | ] |
51 | 51 | }, |
52 | | - |
53 | 52 | { |
54 | 53 | "description": "formatMaximum validation with time format", |
55 | 54 | "schema": { |
|
69 | 68 | "valid": true |
70 | 69 | }, |
71 | 70 | { |
72 | | - "description": "boundary point is valid, timezone is ignored", |
| 71 | + "description": "time before the maximum time is valid, timezone is taken into account", |
73 | 72 | "data": "13:15:17.000+01:00", |
74 | 73 | "valid": true |
75 | 74 | }, |
| 75 | + { |
| 76 | + "description": "boundary point is valid, timezone is taken into account", |
| 77 | + "data": "14:15:17.000+01:00", |
| 78 | + "valid": true |
| 79 | + }, |
| 80 | + { |
| 81 | + "description": "time after the maximum time is invalid, timezone is taken into account", |
| 82 | + "data": "14:20:17.000+01:00", |
| 83 | + "valid": false |
| 84 | + }, |
76 | 85 | { |
77 | 86 | "description": "time before the maximum time is valid", |
78 | 87 | "data": "10:33:55.000Z", |
|
99 | 108 | "valid": false |
100 | 109 | }, |
101 | 110 | { |
102 | | - "description": "boundary point is invalid, timezone is ignored", |
103 | | - "data": "13:15:17.000+01:00", |
104 | | - "valid": false |
105 | | - }, |
106 | | - { |
107 | | - "description": "boundary point is invalid, no timezone is ok too", |
108 | | - "data": "13:15:17.000", |
| 111 | + "description": "boundary point is invalid, timezone is taken into account", |
| 112 | + "data": "14:15:17.000+01:00", |
109 | 113 | "valid": false |
110 | 114 | }, |
111 | 115 | { |
|
115 | 119 | } |
116 | 120 | ] |
117 | 121 | }, |
118 | | - |
119 | 122 | { |
120 | 123 | "description": "formatMaximum validation with date-time format", |
121 | 124 | "schema": { |
|
186 | 189 | } |
187 | 190 | ] |
188 | 191 | }, |
| 192 | + { |
| 193 | + "description": "formatMaximum validation with iso-time format", |
| 194 | + "schema": { |
| 195 | + "type": "string", |
| 196 | + "format": "iso-time", |
| 197 | + "formatMaximum": "13:15:17.000Z" |
| 198 | + }, |
| 199 | + "tests": [ |
| 200 | + { |
| 201 | + "description": "time after the maximum time is invalid", |
| 202 | + "data": "15:11:09.000Z", |
| 203 | + "valid": false |
| 204 | + }, |
| 205 | + { |
| 206 | + "description": "boundary point is valid", |
| 207 | + "data": "13:15:17.000Z", |
| 208 | + "valid": true |
| 209 | + }, |
| 210 | + { |
| 211 | + "description": "time before the maximum time is valid, timezone is ignored", |
| 212 | + "data": "13:15:16.000+01:00", |
| 213 | + "valid": true |
| 214 | + }, |
| 215 | + { |
| 216 | + "description": "boundary point is valid, timezone is ignored", |
| 217 | + "data": "13:15:17.000+01:00", |
| 218 | + "valid": true |
| 219 | + }, |
| 220 | + { |
| 221 | + "description": "time after the maximum time is invalid, timezone is ignored", |
| 222 | + "data": "13:15:18.000+01:00", |
| 223 | + "valid": false |
| 224 | + }, |
| 225 | + { |
| 226 | + "description": "time before the maximum time is valid", |
| 227 | + "data": "10:33:55.000Z", |
| 228 | + "valid": true |
| 229 | + } |
| 230 | + ] |
| 231 | + }, |
| 232 | + { |
| 233 | + "description": "formatExclusiveMaximum validation with iso-time format", |
| 234 | + "schema": { |
| 235 | + "type": "string", |
| 236 | + "format": "iso-time", |
| 237 | + "formatExclusiveMaximum": "13:15:17.000Z" |
| 238 | + }, |
| 239 | + "tests": [ |
| 240 | + { |
| 241 | + "description": "time after the maximum time is still invalid", |
| 242 | + "data": "15:11:09.000Z", |
| 243 | + "valid": false |
| 244 | + }, |
| 245 | + { |
| 246 | + "description": "boundary point is invalid", |
| 247 | + "data": "13:15:17.000Z", |
| 248 | + "valid": false |
| 249 | + }, |
| 250 | + { |
| 251 | + "description": "boundary point is invalid, timezone is ignored", |
| 252 | + "data": "13:15:17.000+01:00", |
| 253 | + "valid": false |
| 254 | + }, |
| 255 | + { |
| 256 | + "description": "time before the maximum time is still valid", |
| 257 | + "data": "10:33:55.000Z", |
| 258 | + "valid": true |
| 259 | + } |
| 260 | + ] |
| 261 | + }, |
| 262 | + { |
| 263 | + "description": "formatMaximum validation with iso-date-time format", |
| 264 | + "schema": { |
| 265 | + "type": "string", |
| 266 | + "format": "iso-date-time", |
| 267 | + "formatMaximum": "2015-08-17T13:15:17.000Z" |
| 268 | + }, |
| 269 | + "tests": [ |
| 270 | + { |
| 271 | + "description": "date after the maximum date is invalid", |
| 272 | + "data": "2015-11-09T13:15:17.000Z", |
| 273 | + "valid": false |
| 274 | + }, |
| 275 | + { |
| 276 | + "description": "same date, time after the maximum time is invalid", |
| 277 | + "data": "2015-08-17T15:11:09.000Z", |
| 278 | + "valid": false |
| 279 | + }, |
| 280 | + { |
| 281 | + "description": "boundary point is valid", |
| 282 | + "data": "2015-08-17T13:15:17.000Z", |
| 283 | + "valid": true |
| 284 | + }, |
| 285 | + { |
| 286 | + "description": "same date, time before the maximum time is valid", |
| 287 | + "data": "2015-08-17T10:33:55.000Z", |
| 288 | + "valid": true |
| 289 | + }, |
| 290 | + { |
| 291 | + "description": "date before the maximum date is valid", |
| 292 | + "data": "2014-12-03T13:15:17.000Z", |
| 293 | + "valid": true |
| 294 | + } |
| 295 | + ] |
| 296 | + }, |
| 297 | + { |
| 298 | + "description": "formatExclusiveMaximum validation with iso-date-time format", |
| 299 | + "schema": { |
| 300 | + "type": "string", |
| 301 | + "format": "iso-date-time", |
| 302 | + "formatExclusiveMaximum": "2015-08-17T13:15:17.000Z" |
| 303 | + }, |
| 304 | + "tests": [ |
| 305 | + { |
| 306 | + "description": "date after the maximum date is still invalid", |
| 307 | + "data": "2015-11-09T13:15:17.000Z", |
| 308 | + "valid": false |
| 309 | + }, |
| 310 | + { |
| 311 | + "description": "same date, time after the maximum time is still invalid", |
| 312 | + "data": "2015-08-17T15:11:09.000Z", |
| 313 | + "valid": false |
| 314 | + }, |
| 315 | + { |
| 316 | + "description": "boundary point is invalid", |
| 317 | + "data": "2015-08-17T13:15:17.000Z", |
| 318 | + "valid": false |
| 319 | + }, |
| 320 | + { |
| 321 | + "description": "same date, time before the maximum time is still valid", |
| 322 | + "data": "2015-08-17T10:33:55.000Z", |
| 323 | + "valid": true |
| 324 | + }, |
| 325 | + { |
| 326 | + "description": "date before the maximum date is still valid", |
| 327 | + "data": "2014-12-03T13:15:17.000Z", |
| 328 | + "valid": true |
| 329 | + } |
| 330 | + ] |
| 331 | + }, |
189 | 332 | { |
190 | 333 | "description": "formatMaximum is valid with whitelisted unknown format", |
191 | 334 | "schema": { |
|
0 commit comments