-
-
Notifications
You must be signed in to change notification settings - Fork 779
Closed
Labels
Description
Description
Tried using aiohttp.web.View with MethodViewResolver, as in the example, but there is Flask (https://github.com/zalando/connexion/tree/master/examples/openapi3/methodresolver). Maybe I'm doing something wrong ?
Expected behaviour
The app started
Actual behaviour
Getting an error
ERROR:connexion.apis.abstract:Failed to add operation for GET /v1.0/pets
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/connexion/apis/abstract.py", line 209, in add_paths
self.add_operation(path, method)
File "/usr/local/lib/python3.7/site-packages/connexion/apis/abstract.py", line 173, in add_operation
pass_context_arg_name=self.pass_context_arg_name
File "/usr/local/lib/python3.7/site-packages/connexion/operations/__init__.py", line 8, in make_operation
return spec.operation_cls.from_spec(spec, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/connexion/operations/openapi.py", line 138, in from_spec
**kwargs
File "/usr/local/lib/python3.7/site-packages/connexion/operations/openapi.py", line 89, in __init__
pass_context_arg_name=pass_context_arg_name
File "/usr/local/lib/python3.7/site-packages/connexion/operations/abstract.py", line 96, in __init__
self._resolution = resolver.resolve(self)
File "/usr/local/lib/python3.7/site-packages/connexion/resolver.py", line 40, in resolve
return Resolution(self.resolve_function_from_operation_id(operation_id), operation_id)
File "/usr/local/lib/python3.7/site-packages/connexion/resolver.py", line 183, in resolve_function_from_operation_id
view = view_cls()
TypeError: __init__() missing 1 required positional argument: 'request'
Steps to reproduce
Take an example https://github.com/zalando/connexion/tree/master/examples/openapi3/methodresolver, replace the Flask with AioHTTP
Additional info:
Output of the commands:
python --version
Python 3.7.4pip show connexion | grep "^Version\:"
Version: 2.5.1