From 7746c66de3ff988d0c1b848879032e8691319715 Mon Sep 17 00:00:00 2001 From: Tibor Reiss <75096465+tibor-reiss@users.noreply.github.com> Date: Sat, 25 May 2024 10:26:23 +0200 Subject: [PATCH] fix: exclude static file from schema (#3509) --- litestar/static_files/config.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/litestar/static_files/config.py b/litestar/static_files/config.py index 22b6620aa4..8ee77b77de 100644 --- a/litestar/static_files/config.py +++ b/litestar/static_files/config.py @@ -10,7 +10,6 @@ from litestar.response.file import ASGIFileResponse # noqa: TCH001 from litestar.router import Router from litestar.static_files.base import StaticFiles -from litestar.types import Empty from litestar.utils import normalize_path, warn_deprecation __all__ = ("StaticFilesConfig",) @@ -119,7 +118,7 @@ def create_static_files_router( cache_control: CacheControlHeader | None = None, exception_handlers: ExceptionHandlersMap | None = None, guards: list[Guard] | None = None, - include_in_schema: bool | EmptyType = Empty, + include_in_schema: bool | EmptyType = False, middleware: Sequence[Middleware] | None = None, opt: dict[str, Any] | None = None, security: Sequence[SecurityRequirement] | None = None,