-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File upload is too aggressive #53
Comments
I am wondering if |
That's would then also require to refactor construct_params in bravado to handle it for param_name, param_value in iteritems(op_kwargs):
param = current_params.pop(param_name, None)
if param is None:
raise SwaggerMappingError(
"{0} does not have parameter {1}"
.format(self.operation.operation_id, param_name))
marshal_param(param, param_value, request) the last line will now raise when no file is given in the |
@prat0318 |
@laucia my opinion is that if
Isn't it an undesired behavior? Why should it just work? @bpicolo agreed. |
So, just to be clear I found out that we bravado was setting some files to None when not provided the hard way. I'm not super sure who (or what) is adding If I find time, I will do a step debugging with a simpler test case reproducing the issue, to know what messes up, and will open a ticket accordingly. @prat0318 there is no validation for files in validate_schema_object. That could deserve a ticket yes. |
what is the status for solving this issue? |
results in
{'files': [('photo', ('photo', None))]}
feels like this should be
{}
as this results in bravado always trying to upload an empty/inexisting file if it is defined in the spec, which doesn't play well with most bravado clients (Fido
andRequestsClient
).The text was updated successfully, but these errors were encountered: