how to set Tag description in Sanic-openapi?

195 Views Asked by At

I have a Python Sanic server, and now adding the Swagger config to the endpoints. I use Sanic OpenAPI 21.6.0

I can add tag to my endpoints to group them, but can't find how to add tag description. the doc.tag() only accept one parameter and will put it as tag name.

@api.get('inlens/admin/lookup')
@doc.tag('Admin')
async def get_job_status(request, user):

What I want is like this: tag description

1

There are 1 best solutions below

0
On

Use summary to add tag description:

@api.get('inlens/admin/lookup')
@doc.tag('Admin')
@doc.summary('This is admin description')
def get_job_status(request):
    ...

enter image description here