Skip to content

Commit f32cd8b

Browse files
Revert "Revert "by default, "format" only annotates, not validates""
This reverts the parts of commit 0173a08 that pertain to draft2020-12 and draft-next. Resolves #660.
1 parent 47958f8 commit f32cd8b

File tree

2 files changed

+190
-0
lines changed

2 files changed

+190
-0
lines changed

tests/draft-next/format.json

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
"description": "all string formats ignore nulls",
3636
"data": null,
3737
"valid": true
38+
},
39+
{
40+
"description": "invalid email string is only an annotation by default",
41+
"data": "2962",
42+
"valid": true
3843
}
3944
]
4045
},
@@ -74,6 +79,11 @@
7479
"description": "all string formats ignore nulls",
7580
"data": null,
7681
"valid": true
82+
},
83+
{
84+
"description": "invalid idn-email string is only an annotation by default",
85+
"data": "2962",
86+
"valid": true
7787
}
7888
]
7989
},
@@ -113,6 +123,11 @@
113123
"description": "all string formats ignore nulls",
114124
"data": null,
115125
"valid": true
126+
},
127+
{
128+
"description": "invalid regex string is only an annotation by default",
129+
"data": "^(abc]",
130+
"valid": true
116131
}
117132
]
118133
},
@@ -152,6 +167,11 @@
152167
"description": "all string formats ignore nulls",
153168
"data": null,
154169
"valid": true
170+
},
171+
{
172+
"description": "invalid ipv4 string is only an annotation by default",
173+
"data": "127.0.0.0.1",
174+
"valid": true
155175
}
156176
]
157177
},
@@ -191,6 +211,11 @@
191211
"description": "all string formats ignore nulls",
192212
"data": null,
193213
"valid": true
214+
},
215+
{
216+
"description": "invalid ipv6 string is only an annotation by default",
217+
"data": "12345::",
218+
"valid": true
194219
}
195220
]
196221
},
@@ -230,6 +255,11 @@
230255
"description": "all string formats ignore nulls",
231256
"data": null,
232257
"valid": true
258+
},
259+
{
260+
"description": "invalid idn-hostname string is only an annotation by default",
261+
"data": "〮실례.테스트",
262+
"valid": true
233263
}
234264
]
235265
},
@@ -269,6 +299,11 @@
269299
"description": "all string formats ignore nulls",
270300
"data": null,
271301
"valid": true
302+
},
303+
{
304+
"description": "invalid hostname string is only an annotation by default",
305+
"data": "-a-host-name-that-starts-with--",
306+
"valid": true
272307
}
273308
]
274309
},
@@ -308,6 +343,11 @@
308343
"description": "all string formats ignore nulls",
309344
"data": null,
310345
"valid": true
346+
},
347+
{
348+
"description": "invalid date string is only an annotation by default",
349+
"data": "06/19/1963",
350+
"valid": true
311351
}
312352
]
313353
},
@@ -347,6 +387,11 @@
347387
"description": "all string formats ignore nulls",
348388
"data": null,
349389
"valid": true
390+
},
391+
{
392+
"description": "invalid date-time string is only an annotation by default",
393+
"data": "1990-02-31T15:59:60.123-08:00",
394+
"valid": true
350395
}
351396
]
352397
},
@@ -386,6 +431,11 @@
386431
"description": "all string formats ignore nulls",
387432
"data": null,
388433
"valid": true
434+
},
435+
{
436+
"description": "invalid time string is only an annotation by default",
437+
"data": "08:30:06 PST",
438+
"valid": true
389439
}
390440
]
391441
},
@@ -425,6 +475,11 @@
425475
"description": "all string formats ignore nulls",
426476
"data": null,
427477
"valid": true
478+
},
479+
{
480+
"description": "invalid json-pointer string is only an annotation by default",
481+
"data": "/foo/bar~",
482+
"valid": true
428483
}
429484
]
430485
},
@@ -464,6 +519,11 @@
464519
"description": "all string formats ignore nulls",
465520
"data": null,
466521
"valid": true
522+
},
523+
{
524+
"description": "invalid relative-json-pointer string is only an annotation by default",
525+
"data": "/foo/bar",
526+
"valid": true
467527
}
468528
]
469529
},
@@ -503,6 +563,11 @@
503563
"description": "all string formats ignore nulls",
504564
"data": null,
505565
"valid": true
566+
},
567+
{
568+
"description": "invalid iri string is only an annotation by default",
569+
"data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334",
570+
"valid": true
506571
}
507572
]
508573
},
@@ -542,6 +607,11 @@
542607
"description": "all string formats ignore nulls",
543608
"data": null,
544609
"valid": true
610+
},
611+
{
612+
"description": "invalid iri-reference string is only an annotation by default",
613+
"data": "\\\\WINDOWS\\filëßåré",
614+
"valid": true
545615
}
546616
]
547617
},
@@ -581,6 +651,11 @@
581651
"description": "all string formats ignore nulls",
582652
"data": null,
583653
"valid": true
654+
},
655+
{
656+
"description": "invalid uri string is only an annotation by default",
657+
"data": "//foo.bar/?baz=qux#quux",
658+
"valid": true
584659
}
585660
]
586661
},
@@ -620,6 +695,11 @@
620695
"description": "all string formats ignore nulls",
621696
"data": null,
622697
"valid": true
698+
},
699+
{
700+
"description": "invalid uri-reference string is only an annotation by default",
701+
"data": "\\\\WINDOWS\\fileshare",
702+
"valid": true
623703
}
624704
]
625705
},
@@ -659,6 +739,11 @@
659739
"description": "all string formats ignore nulls",
660740
"data": null,
661741
"valid": true
742+
},
743+
{
744+
"description": "invalid uri-template string is only an annotation by default",
745+
"data": "http://example.com/dictionary/{term:1}/{term",
746+
"valid": true
662747
}
663748
]
664749
},
@@ -698,6 +783,11 @@
698783
"description": "all string formats ignore nulls",
699784
"data": null,
700785
"valid": true
786+
},
787+
{
788+
"description": "invalid uuid string is only an annotation by default",
789+
"data": "2eb8aa08-aa98-11ea-b4aa-73b441d1638",
790+
"valid": true
701791
}
702792
]
703793
},
@@ -737,6 +827,11 @@
737827
"description": "all string formats ignore nulls",
738828
"data": null,
739829
"valid": true
830+
},
831+
{
832+
"description": "invalid duration string is only an annotation by default",
833+
"data": "PT1D",
834+
"valid": true
740835
}
741836
]
742837
}

0 commit comments

Comments
 (0)