File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
java/com/networknt/schema Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ public void testRequiredValidator() throws Exception {
270270 runTestFile ("tests/required.json" );
271271 }
272272
273+
273274 @ Test
274275 public void testTypeValidator () throws Exception {
275276 runTestFile ("tests/type.json" );
@@ -300,4 +301,10 @@ public void testSchemaFromClasspath() throws Exception {
300301 runTestFile ("tests/classpath/schema.json" );
301302 }
302303
304+
305+
306+ @ Test
307+ public void testUUIDValidator () throws Exception {
308+ runTestFile ("tests/uuid.json" );
309+ }
303310}
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "description" : " uuid format validation" ,
4+ "schema" : {"format" : " uuid" },
5+ "tests" : [
6+ {
7+ "description" : " invalid uuid" ,
8+ "data" : " df984f5c-59bd-48e3sac87-b03d574b37e9" ,
9+ "valid" : false
10+ },
11+ {
12+ "description" : " valid uuid string" ,
13+ "data" : " df984f5c-59bd-48e3-ac87-b03d574b37e9" ,
14+ "valid" : true
15+ },
16+ {
17+ "description" : " too short, it is invalid" ,
18+ "data" : " 5fc03087d-d265-11e7-b8c6-83e29cd24f" ,
19+ "valid" : false
20+ },
21+ {
22+ "description" : " two long, length is greater than 36" ,
23+ "data" : " 5fc03087d-d265-11e7-b8c6-83e29cd24f42333" ,
24+ "valid" : false
25+ }
26+ ]
27+ }
28+ ]
You can’t perform that action at this time.
0 commit comments