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
connexion support for sending multiple body types for the same request body.
for example:
application/x-www-form-urlencoded
application/json
Expected behavior
Connexion accepts multiple content types for the same request
Actual behavior
will work for 'application/x-www-form-urlencoded' because it is the first content type in the request
but for 'application/json' will fail with an Erro and a warning:
WARNING this operation accepts multiple content types, using application/x-www-form-urlencoded
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2463, in wsgi_app
``` response = self.full_dispatch_request()
``` File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1760, in full_dispatch_request
``` rv = self.handle_user_exception(e)
``` File "/usr/local/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function
``` return cors_after_request(app.make_response(f(*args, **kwargs)))
``` File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1758, in full_dispatch_request
``` rv = self.dispatch_request()
``` File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1734, in dispatch_request
``` return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
``` File "/usr/local/lib/python3.8/site-packages/connexion/decorators/decorator.py", line 68, in wrapper
``` response = function(request)
``` File "/usr/local/lib/python3.8/site-packages/connexion/decorators/uri_parsing.py", line 149, in wrapper
``` response = function(request)
``` File "/usr/local/lib/python3.8/site-packages/connexion/decorators/validation.py", line 173, in wrapper
``` data.update(dict.fromkeys(request.files, '')) # validator expects string..
``` AttributeError: 'bytes' object has no attribute 'update'
if the the order is switched(content type 'application/json' is first and then 'application/x-www-form-urlencoded')
it will work for 'application/json' and for 'application/x-www-form-urlencoded' it will return an empty bytes object with the warning:
WARNING this operation accepts multiple content types, using application/json
Additional info:
I saw that there was a commit to try and fix this but it was closed: #1435
and a commit to support this issue that was merged but not tagged yet in a release: #1588
when will this issue be fixed?
is it expected to be released soon?
thanks in advance
Steps to reproduce
a request body for example I would expect to work:
Hi @gfleischer-meta this is indeed fixed in the PR you linked, but not yet released as this is part of a major refactoring towards version 3.0. We're done with most feature work with 3.0, now just working on expanding our test suite for the new AsyncApp, after which we'll release a first alpha version. I hope to do this in the next weeks.
Description
connexion support for sending multiple body types for the same request body.
for example:
Expected behavior
Connexion accepts multiple content types for the same request
Actual behavior
will work for 'application/x-www-form-urlencoded' because it is the first content type in the request
but for 'application/json' will fail with an Erro and a warning:
WARNING this operation accepts multiple content types, using application/x-www-form-urlencoded
if the the order is switched(content type 'application/json' is first and then 'application/x-www-form-urlencoded')
it will work for 'application/json' and for 'application/x-www-form-urlencoded' it will return an empty bytes object with the warning:
WARNING this operation accepts multiple content types, using application/json
Additional info:
I saw that there was a commit to try and fix this but it was closed:
#1435
and a commit to support this issue that was merged but not tagged yet in a release:
#1588
when will this issue be fixed?
is it expected to be released soon?
thanks in advance
Steps to reproduce
a request body for example I would expect to work:
The text was updated successfully, but these errors were encountered: