@@ -3908,6 +3908,7 @@ def url_schema(
3908
3908
default_host : str | None = None ,
3909
3909
default_port : int | None = None ,
3910
3910
default_path : str | None = None ,
3911
+ preserve_empty_path : bool | None = None ,
3911
3912
strict : bool | None = None ,
3912
3913
ref : str | None = None ,
3913
3914
metadata : dict [str , Any ] | None = None ,
@@ -3932,6 +3933,7 @@ def url_schema(
3932
3933
default_host: The default host to use if the URL does not have a host
3933
3934
default_port: The default port to use if the URL does not have a port
3934
3935
default_path: The default path to use if the URL does not have a path
3936
+ preserve_empty_path: Whether to preserve an empty path or convert it to '/', default False
3935
3937
strict: Whether to use strict URL parsing
3936
3938
ref: optional unique identifier of the schema, used to reference the schema in other places
3937
3939
metadata: Any other information you want to include with the schema, not used by pydantic-core
@@ -3945,6 +3947,7 @@ def url_schema(
3945
3947
default_host = default_host ,
3946
3948
default_port = default_port ,
3947
3949
default_path = default_path ,
3950
+ preserve_empty_path = preserve_empty_path ,
3948
3951
strict = strict ,
3949
3952
ref = ref ,
3950
3953
metadata = metadata ,
@@ -3974,6 +3977,7 @@ def multi_host_url_schema(
3974
3977
default_host : str | None = None ,
3975
3978
default_port : int | None = None ,
3976
3979
default_path : str | None = None ,
3980
+ preserve_empty_path : bool | None = None ,
3977
3981
strict : bool | None = None ,
3978
3982
ref : str | None = None ,
3979
3983
metadata : dict [str , Any ] | None = None ,
@@ -3998,6 +4002,7 @@ def multi_host_url_schema(
3998
4002
default_host: The default host to use if the URL does not have a host
3999
4003
default_port: The default port to use if the URL does not have a port
4000
4004
default_path: The default path to use if the URL does not have a path
4005
+ preserve_empty_path: Whether to preserve an empty path or convert it to '/', default False
4001
4006
strict: Whether to use strict URL parsing
4002
4007
ref: optional unique identifier of the schema, used to reference the schema in other places
4003
4008
metadata: Any other information you want to include with the schema, not used by pydantic-core
@@ -4011,6 +4016,7 @@ def multi_host_url_schema(
4011
4016
default_host = default_host ,
4012
4017
default_port = default_port ,
4013
4018
default_path = default_path ,
4019
+ preserve_empty_path = preserve_empty_path ,
4014
4020
strict = strict ,
4015
4021
ref = ref ,
4016
4022
metadata = metadata ,
0 commit comments