Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,3 +67,15 @@ async def retract_message(message_id: str):
|
|
| 67 |
messages = deque([m for m in messages if m["id"] != message_id], maxlen=MAX_MESSAGES)
|
| 68 |
return {"status": "ok"}
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
messages = deque([m for m in messages if m["id"] != message_id], maxlen=MAX_MESSAGES)
|
| 68 |
return {"status": "ok"}
|
| 69 |
|
| 70 |
+
# ---------- 4️⃣ Explicit Swagger docs endpoint ----------
|
| 71 |
+
@app.get("/docs", include_in_schema=False)
|
| 72 |
+
async def custom_swagger_ui_html():
|
| 73 |
+
return get_swagger_ui_html(
|
| 74 |
+
openapi_url=app.openapi_url,
|
| 75 |
+
title=app.title + " - Swagger UI",
|
| 76 |
+
oauth2_redirect_url=app.swagger_ui_oauth2_redirect_url,
|
| 77 |
+
swagger_js_url="https://unpkg.com/[email protected]/swagger-ui-bundle.js",
|
| 78 |
+
swagger_css_url="https://unpkg.com/[email protected]/swagger-ui.css",
|
| 79 |
+
)
|
| 80 |
+
|
| 81 |
+
|