KShoichi commited on
Commit
ae7c3e0
·
verified ·
1 Parent(s): 370d099

Upload app/api/docs.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app/api/docs.py +9 -0
app/api/docs.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import APIRouter
2
+ from fastapi.responses import JSONResponse
3
+
4
+ router = APIRouter()
5
+
6
+ @router.get("/openapi.json")
7
+ def openapi_schema():
8
+ # FastAPI serves this automatically, but you can customize if needed
9
+ return JSONResponse({"info": "See /docs for Swagger UI and /redoc for ReDoc."})