bravado-core
bravado-core copied to clipboard
User-defined formatter validate functions have to handle None.
When defining custom formatters with SwaggerFormat, the validate function has to handle None values. So all my validators are littered with code like this:
def my_validator(val):
if val is not None:
# real validation here
Shouldn't None be special-cased, left to x-nullable checking, never calling the validator when value==None is True? This is quite tedious.
+1 Might be related to my PR #143