-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
Uploaded file not passed to endpoints taking kwargs #750
Labels
Comments
Thanks for taking the time to file this ticket. That definitely sounds like a bug to me! |
@simenaasland please have a look at #753 - I think it should fix the issue. |
@dtkav Thanks a lot for looking at this so quickly! The fix looks good to me. Do you want me to comment and/or approve in the PR itself? |
yeah, that would be great!
…On Tue, Nov 6, 2018, 7:24 AM Simen Aasland ***@***.***> wrote:
@dtkav <https://github.com/dtkav> Thanks a lot for looking at this so
quickly! The fix looks good to me. Do you want me to comment and/or approve
in the PR itself?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#750 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAlPSXi_zCtM1YFRldEaUNUjW4OeZfOvks5usanGgaJpZM4YP__B>
.
|
jmcs
pushed a commit
that referenced
this issue
Nov 7, 2018
- pass file if filename in arguments _or_ has_kwargs (Fixes #750)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I am not 100% sure this should be considered a bug, but the behavior has changed between 1.2.0 and 2.0.0, so it might be a regression. Uploaded files are only passed as arguments to endpoints not taking kwargs in version 2.0.0.
Expected behaviour
When uploading a file, the file should always be passed as a parameter to the endpoint.
Actual behaviour
When uploading a file, the file is only passed to endpoints not taking kwargs.
Steps to reproduce
api.yaml:
app.py:
Run application and send request:
Response with connexion 1.2.0: Got file as arg
Response with connexion 2.0.0: Did not get file as arg
This seems to be the relevant change since 1.2.0:
https://github.com/zalando/connexion/blob/44ea9336fe79ddb9592942b405a663d2e3aa612c/connexion/operations/abstract.py#L169-L171
Additional info:
Output of the commands:
python --version
: Python 2.7.15rc1pip show connexion | grep "^Version\:"
: Version: 2.0.0The text was updated successfully, but these errors were encountered: