2023-02-16 15:56:28 +02:00
|
|
|
from fastapi import FastAPI
|
2023-06-22 14:17:53 +03:00
|
|
|
from fastapi.openapi.docs import get_redoc_html, get_swagger_ui_html
|
2022-12-20 02:22:32 +02:00
|
|
|
|
2023-11-25 18:50:09 +02:00
|
|
|
app = FastAPI(title="END PLAY Photos", docs_url=None, redoc_url=None, version="0.6")
|
2022-12-20 02:22:32 +02:00
|
|
|
|
2023-03-12 15:59:13 +02:00
|
|
|
|
2022-12-20 02:22:32 +02:00
|
|
|
@app.get("/docs", include_in_schema=False)
|
|
|
|
async def custom_swagger_ui_html():
|
|
|
|
return get_swagger_ui_html(
|
2023-06-23 13:17:01 +03:00
|
|
|
openapi_url=app.openapi_url,
|
|
|
|
title=f"{app.title} - Documentation",
|
2023-03-12 15:59:13 +02:00
|
|
|
swagger_favicon_url="/favicon.ico",
|
2022-12-20 02:22:32 +02:00
|
|
|
)
|
|
|
|
|
2023-03-12 15:59:13 +02:00
|
|
|
|
2022-12-20 02:22:32 +02:00
|
|
|
@app.get("/redoc", include_in_schema=False)
|
|
|
|
async def custom_redoc_html():
|
|
|
|
return get_redoc_html(
|
2023-06-23 13:17:01 +03:00
|
|
|
openapi_url=app.openapi_url,
|
|
|
|
title=f"{app.title} - Documentation",
|
2023-03-12 15:59:13 +02:00
|
|
|
redoc_favicon_url="/favicon.ico",
|
|
|
|
)
|