@@ -867,13 +867,13 @@ async def create_user(request: Request):
867867 ),
868868 ] = None ,
869869 redirect_slashes : Annotated [
870- bool ,
870+ bool | None ,
871871 Doc (
872872 """
873873 Enable or disable automatic trailing slash redirection for HTTP routes.
874874 """
875875 ),
876- ] = True ,
876+ ] = None ,
877877 lifespan : Annotated [
878878 Lifespan [ApplicationType ] | None ,
879879 Doc (
@@ -886,7 +886,7 @@ async def create_user(request: Request):
886886 ),
887887 ] = None ,
888888 include_in_schema : Annotated [
889- bool ,
889+ bool | None ,
890890 Doc (
891891 """
892892 Enable or disable inclusion of the application in a OpenAPI schema integration.
@@ -896,7 +896,7 @@ async def create_user(request: Request):
896896 flags that can be used for any possible integration.
897897 """
898898 ),
899- ] = True ,
899+ ] = None ,
900900 logging_config : Annotated [
901901 LoggingConfig | None ,
902902 Doc (
@@ -951,7 +951,7 @@ async def populate_g(connection: Connection):
951951 Enable or disable OpenAPI documentation generation. Defaults to False.
952952 """
953953 ),
954- ] = False ,
954+ ] = None ,
955955 openapi_config : Annotated [
956956 Any | None ,
957957 Doc (
@@ -970,7 +970,7 @@ async def populate_g(connection: Connection):
970970 With this flag enable, Lilya custom middleware activates those.
971971 """
972972 ),
973- ] = False ,
973+ ] = None ,
974974 root_path : Annotated [
975975 str | None ,
976976 Doc (
@@ -1046,11 +1046,17 @@ async def populate_g(connection: Connection):
10461046 "enable_intercept_global_exceptions" , enable_intercept_global_exceptions
10471047 )
10481048 self .root_path = self .load_settings_value ("root_path" , root_path )
1049+ self .redirect_slashes = self .load_settings_value (
1050+ "redirect_slashes" , redirect_slashes , is_boolean = True
1051+ )
1052+ self .include_in_schema = self .load_settings_value (
1053+ "include_in_schema" , include_in_schema , is_boolean = True
1054+ )
10491055
10501056 if self .router_class is not None :
10511057 self .router = self .router_class (
10521058 routes = routes ,
1053- redirect_slashes = redirect_slashes ,
1059+ redirect_slashes = self . redirect_slashes ,
10541060 permissions = self .custom_permissions ,
10551061 on_startup = on_startup ,
10561062 on_shutdown = on_shutdown ,
0 commit comments