-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix format checking failed when the input type is unexpected (#283)
* Fix ignoring format test cases * Import official format test cases * Fix format checks for unexpected input type
- Loading branch information
1 parent
001aa27
commit b537c05
Showing
5 changed files
with
1,184 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
[ | ||
{ | ||
"description": "validation of e-mail addresses", | ||
"schema": {"format": "email"}, | ||
"tests": [ | ||
{ | ||
"description": "ignores integers", | ||
"data": 12, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores floats", | ||
"data": 13.7, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores objects", | ||
"data": {}, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores arrays", | ||
"data": [], | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores booleans", | ||
"data": false, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores null", | ||
"data": null, | ||
"valid": true | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "validation of IP addresses", | ||
"schema": {"format": "ipv4"}, | ||
"tests": [ | ||
{ | ||
"description": "ignores integers", | ||
"data": 12, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores floats", | ||
"data": 13.7, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores objects", | ||
"data": {}, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores arrays", | ||
"data": [], | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores booleans", | ||
"data": false, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores null", | ||
"data": null, | ||
"valid": true | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "validation of IPv6 addresses", | ||
"schema": {"format": "ipv6"}, | ||
"tests": [ | ||
{ | ||
"description": "ignores integers", | ||
"data": 12, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores floats", | ||
"data": 13.7, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores objects", | ||
"data": {}, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores arrays", | ||
"data": [], | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores booleans", | ||
"data": false, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores null", | ||
"data": null, | ||
"valid": true | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "validation of hostnames", | ||
"schema": {"format": "hostname"}, | ||
"tests": [ | ||
{ | ||
"description": "ignores integers", | ||
"data": 12, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores floats", | ||
"data": 13.7, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores objects", | ||
"data": {}, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores arrays", | ||
"data": [], | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores booleans", | ||
"data": false, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores null", | ||
"data": null, | ||
"valid": true | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "validation of date-time strings", | ||
"schema": {"format": "date-time"}, | ||
"tests": [ | ||
{ | ||
"description": "ignores integers", | ||
"data": 12, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores floats", | ||
"data": 13.7, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores objects", | ||
"data": {}, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores arrays", | ||
"data": [], | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores booleans", | ||
"data": false, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores null", | ||
"data": null, | ||
"valid": true | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "validation of URIs", | ||
"schema": {"format": "uri"}, | ||
"tests": [ | ||
{ | ||
"description": "ignores integers", | ||
"data": 12, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores floats", | ||
"data": 13.7, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores objects", | ||
"data": {}, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores arrays", | ||
"data": [], | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores booleans", | ||
"data": false, | ||
"valid": true | ||
}, | ||
{ | ||
"description": "ignores null", | ||
"data": null, | ||
"valid": true | ||
} | ||
] | ||
} | ||
] |
Oops, something went wrong.