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."})