You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defadd_file(param, value, request):
"""Add a parameter of type 'file' to the given request. :type param: :class;`bravado.mapping.param.Param` :param value: The raw content of the file to be uploaded :type request: dict """ifrequest.get('files') isNone:
# support multiple files by default by setting to an empty arrayrequest['files'] = []
# The http client should take care of setting the content-type header# to 'multipart/form-data'. Just verify that the swagger spec is# conformantexpected_mime_type='multipart/form-data'ifexpected_mime_typenotinparam.op.consumes:
raiseSwaggerMappingError((
"Mime-type '{0}' not found in list of supported mime-types for ""parameter '{1}' on operation '{2}': {3}").format(
expected_mime_type,
param.name,
param.op.operation_id,
param.op.consumes
))
file_tuple= ('file', (param.name, value))
request['files'].append(file_tuple)
The text was updated successfully, but these errors were encountered:
Implement this validation in ssv:
The text was updated successfully, but these errors were encountered: