Disable API docs that display very much broken due to missing request/response typing.

This commit is contained in:
Leo Vasanko
2026-01-27 23:27:42 +00:00
parent dea62d799f
commit 4cf0bda26d
6 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ from paskia.util import (
)
from paskia.util.hostutil import normalize_host
app = FastAPI()
app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
def is_global_admin(ctx) -> bool:
+1 -1
View File
@@ -26,7 +26,7 @@ from paskia.util import hostutil, htmlutil, passphrase, userinfo, vitedev
bearer_auth = HTTPBearer(auto_error=True)
app = FastAPI()
app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
app.mount("/user", user.app)
+7 -1
View File
@@ -59,7 +59,13 @@ async def lifespan(app: FastAPI): # pragma: no cover - startup path
await stop_background()
app = FastAPI(lifespan=lifespan, redirect_slashes=False)
app = FastAPI(
lifespan=lifespan,
redirect_slashes=False,
docs_url=None,
redoc_url=None,
openapi_url=None,
)
# Apply redirections to auth-host if configured (deny access to restricted endpoints, remove /auth/)
app.middleware("http")(auth_host.redirect_middleware)
+1 -1
View File
@@ -23,7 +23,7 @@ from paskia.fastapi.wsutil import validate_origin, websocket_error_handler
from paskia.util import hostutil, passphrase, pow, useragent
# Create a FastAPI subapp for remote auth WebSocket endpoints
app = FastAPI()
app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
@app.websocket("/request")
+1 -1
View File
@@ -19,7 +19,7 @@ from paskia.fastapi import authz, session
from paskia.fastapi.session import AUTH_COOKIE
from paskia.util import hostutil, passphrase
app = FastAPI()
app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
@app.exception_handler(authz.AuthException)
+1 -1
View File
@@ -10,7 +10,7 @@ from paskia.globals import passkey
from paskia.util import hostutil, passphrase
# Create a FastAPI subapp for WebSocket endpoints
app = FastAPI()
app = FastAPI(docs_url=None, redoc_url=None, openapi_url=None)
# Mount the remote auth WebSocket endpoints
app.mount("/remote-auth", remote.app)