When no body is present (i.e. request.get_json() returns None) the schema is presented None to load from, whereas an empty JSON body could better be interpreted as {}. For a body schema with no required fields this leads to better behavior.
Error aggregation doesn't seem to have been working correctly, as error.data['errors'] never existed, and comment "If any parsing produced an error, combine them and reraise" hints this was the intended behavior.
Two bugs noticed (may not be real bugs).
When no body is present (i.e.
request.get_json()
returnsNone
) the schema is presentedNone
to load from, whereas an empty JSON body could better be interpreted as{}
. For a body schema with no required fields this leads to better behavior.Error aggregation doesn't seem to have been working correctly, as
error.data['errors']
never existed, and comment "If any parsing produced an error, combine them and reraise" hints this was the intended behavior.