Skip to content
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

fix swagger for non aiohug routes #7

Open
nonamenix opened this issue Sep 2, 2018 · 1 comment
Open

fix swagger for non aiohug routes #7

nonamenix opened this issue Sep 2, 2018 · 1 comment

Comments

@nonamenix
Copy link
Member

nonamenix commented Sep 2, 2018

Traceback (most recent call last):
  File "/home/d_ivanof/.virtualenvs/vortex/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 390, in start
    resp = await self._request_handler(request)
  File "/home/d_ivanof/.virtualenvs/vortex/lib/python3.6/site-packages/aiohttp/web_app.py", line 352, in _handle
    resp = await handler(request)
  File "/home/d_ivanof/.virtualenvs/vortex/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 106, in impl
    return await handler(request)
  File "/home/d_ivanof/.virtualenvs/vortex/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 96, in impl
    return await handler(request)
  File "/home/d_ivanof/.virtualenvs/vortex/lib/python3.6/site-packages/aiohug/__init__.py", line 17, in _handler
    resp = await handler(**kwargs)
  File "/home/d_ivanof/.virtualenvs/vortex/lib/python3.6/site-packages/aiohug/swagger/handlers.py", line 14, in swagger_json
    return swagger.generate_swagger(request.app)
  File "/home/d_ivanof/.virtualenvs/vortex/lib/python3.6/site-packages/aiohug/swagger/__init__.py", line 134, in generate_swagger
    parameters = get_parameters(url, handler, spec)
  File "/home/d_ivanof/.virtualenvs/vortex/lib/python3.6/site-packages/aiohug/swagger/__init__.py", line 44, in get_parameters
    defaults = get_default_args(handler._original_handler)
AttributeError: 'function' object has no attribute '_original_handler'
try:
    handler_spec["parameters"] = get_parameters(url, handler, spec)
except AttributeError:
    pass
@nonamenix
Copy link
Member Author

Move it to aiohug_swagger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant