How do you group FastAPI endpoints under tags and describe groups?
Source: fastapi.tiangolo.comintermediate

Tests FastAPI's two-step tag system: decorators label routes, and openapi_tags supplies group descriptions. Good answers cover tagging paths with tags=["users"], then defining metadata in FastAPI(openapi_tags=[...]) with matching names.
Tests whether you understand FastAPI's two-step approach to organizing interactive docs. Endpoints are grouped by adding string tags to path operation decorators like tags=["users"]. Then tag-level descriptions are declared globally via the openapi_tags parameter in the FastAPI constructor, passing a list of dicts with name and description keys that match those strings.
Read the original → fastapi.tiangolo.com
- #fastapi
- #openapi
- #api-documentation
- #swagger
- #metadata
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.