File size: 313 Bytes
ae7c3e0
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
from fastapi import APIRouter
from fastapi.responses import JSONResponse

router = APIRouter()

@router.get("/openapi.json")
def openapi_schema():
    # FastAPI serves this automatically, but you can customize if needed
    return JSONResponse({"info": "See /docs for Swagger UI and /redoc for ReDoc."})