-
Notifications
You must be signed in to change notification settings - Fork 58
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
Does not working class based views #72
Comments
you can use a simple class and route that. class NewsAPIHandler(object):
@docs(
tags=['news'],
summary='Get news article(s)',
description='Get news article.'
)
@request_schema(GetRequestSchema())
async def get_article(self, request):
pass |
Yes, but for the router, I should get a callable Requeste or awaitable stream object. |
Hm... @docs(
tags=["mytag"],
summary="View method summary",
description="View method description",
)
class SomeView(web.View):
async def post(self) -> web.json_response:
pass |
+1 not working for @request_schema(SchemaPost)
@response_schema(SchemaResp)
async def post(self):
... |
As ALeksandr-Fuze mentioned it works only for web.View classes for now. I will make a fix to support your case. |
@maximdanilchenko +1 for this |
Hello guys! Do you have any ETA for this feature? |
python 3.8.
aiohttp 3.6.2
It does not work class-based views, Swagger shows nothing. When using function style all work correctly.
The text was updated successfully, but these errors were encountered: