Currently, if an endpoint does define a body parameter then bravado-core reads the content of the body and throws a SwaggerMappingError if the body is not valid json.
But, if the body parameter is optional then the body won't be present and so the exception will be thrown, which basically forces the body to be defined even if the parameter is optional.
Currently, if an endpoint does define a body parameter then bravado-core reads the content of the body and throws a
SwaggerMappingError
if the body is not valid json.But, if the body parameter is optional then the body won't be present and so the exception will be thrown, which basically forces the body to be defined even if the parameter is optional.
https://github.com/Yelp/bravado-core/blob/43c8002f43e0f2f0e5caf2ead6660677431b3895/bravado_core/param.py#L185