docs: add OpenAPI responses={} to all router endpoints
Add explicit HTTP status code documentation to every endpoint across 15 router files. Each endpoint now declares all possible response codes (200/201/204/400/401/404/409/429/502/503) with descriptions so frontend can distinguish error types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -28,7 +28,15 @@ router: APIRouter = APIRouter(prefix="/api/v1/health", tags=["Health"])
|
||||
log: structlog.stdlib.BoundLogger = structlog.get_logger()
|
||||
|
||||
|
||||
@router.get("", summary="Application health check", response_model=HealthResponse)
|
||||
@router.get(
|
||||
"",
|
||||
summary="Application health check",
|
||||
response_model=HealthResponse,
|
||||
responses={
|
||||
200: {"description": "All components healthy"},
|
||||
503: {"description": "fail2ban offline or component degraded"},
|
||||
},
|
||||
)
|
||||
async def health_check(
|
||||
app_state: AppStateDep,
|
||||
server_status: ServerStatusDep,
|
||||
|
||||
Reference in New Issue
Block a user