Upload app/api/docs.py with huggingface_hub
Browse files- 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."})
|