Closed eduard-sukharev closed 3 years ago
It's because aiohttp-pydantic does not understand the "aiohttp_apispec.doc" decorator.
Currently, you can only custom the generated Open API Specification using annotation or docstring. For example you can add response description with:
@routes.view('/pipeline')
class PipelineView(PydanticView):
async def post(self, some_pydantic_model: SomeModel) -> r201:
"""
Route description
Status Codes:
201: Response description line 1
response description line 2
"""
Currently custom "tags" is not implemented. I will add this feature.
implemented in aiohttp-pydantic 1.11.0
Add docstring with Tags: post_tag
instead of use decorator.
How to define tags for PydanticViews? The usual solution with
@docs
annotation does not work: