@@ -261,7 +261,7 @@ def simple_ser_schema(type: ExpectedSerializationTypes) -> SimpleSerSchema:
261
261
262
262
263
263
class PlainSerializerFunctionSerSchema (TypedDict , total = False ):
264
- type : Required [Literal ['function-plain' ]]
264
+ type : Required [Literal ['serializer- function-plain' ]]
265
265
function : Required [SerializerFunction ]
266
266
is_field_serializer : bool # default False
267
267
info_arg : bool # default False
@@ -292,7 +292,7 @@ def plain_serializer_function_ser_schema(
292
292
# just to avoid extra elements in schema, and to use the actual default defined in rust
293
293
when_used = None # type: ignore
294
294
return _dict_not_none (
295
- type = 'function-plain' ,
295
+ type = 'serializer- function-plain' ,
296
296
function = function ,
297
297
is_field_serializer = is_field_serializer ,
298
298
info_arg = info_arg ,
@@ -322,7 +322,7 @@ def __call__(self, input_value: Any, index_key: int | str | None = None, /) -> A
322
322
323
323
324
324
class WrapSerializerFunctionSerSchema (TypedDict , total = False ):
325
- type : Required [Literal ['function-wrap' ]]
325
+ type : Required [Literal ['serializer- function-wrap' ]]
326
326
function : Required [WrapSerializerFunction ]
327
327
is_field_serializer : bool # default False
328
328
info_arg : bool # default False
@@ -356,7 +356,7 @@ def wrap_serializer_function_ser_schema(
356
356
# just to avoid extra elements in schema, and to use the actual default defined in rust
357
357
when_used = None # type: ignore
358
358
return _dict_not_none (
359
- type = 'function-wrap' ,
359
+ type = 'serializer- function-wrap' ,
360
360
function = function ,
361
361
is_field_serializer = is_field_serializer ,
362
362
info_arg = info_arg ,
@@ -1966,7 +1966,7 @@ class _ValidatorFunctionSchema(TypedDict, total=False):
1966
1966
1967
1967
1968
1968
class BeforeValidatorFunctionSchema (_ValidatorFunctionSchema , total = False ):
1969
- type : Required [Literal ['function-before' ]]
1969
+ type : Required [Literal ['validator- function-before' ]]
1970
1970
json_schema_input_schema : CoreSchema
1971
1971
1972
1972
@@ -2006,7 +2006,7 @@ def fn(v: bytes) -> str:
2006
2006
serialization: Custom serialization schema
2007
2007
"""
2008
2008
return _dict_not_none (
2009
- type = 'function-before' ,
2009
+ type = 'validator- function-before' ,
2010
2010
function = {'type' : 'no-info' , 'function' : function },
2011
2011
schema = schema ,
2012
2012
ref = ref ,
@@ -2057,7 +2057,7 @@ def fn(v: bytes, info: core_schema.ValidationInfo) -> str:
2057
2057
serialization: Custom serialization schema
2058
2058
"""
2059
2059
return _dict_not_none (
2060
- type = 'function-before' ,
2060
+ type = 'validator- function-before' ,
2061
2061
function = _dict_not_none (type = 'with-info' , function = function , field_name = field_name ),
2062
2062
schema = schema ,
2063
2063
ref = ref ,
@@ -2068,7 +2068,7 @@ def fn(v: bytes, info: core_schema.ValidationInfo) -> str:
2068
2068
2069
2069
2070
2070
class AfterValidatorFunctionSchema (_ValidatorFunctionSchema , total = False ):
2071
- type : Required [Literal ['function-after' ]]
2071
+ type : Required [Literal ['validator- function-after' ]]
2072
2072
2073
2073
2074
2074
def no_info_after_validator_function (
@@ -2105,7 +2105,7 @@ def fn(v: str) -> str:
2105
2105
serialization: Custom serialization schema
2106
2106
"""
2107
2107
return _dict_not_none (
2108
- type = 'function-after' ,
2108
+ type = 'validator- function-after' ,
2109
2109
function = {'type' : 'no-info' , 'function' : function },
2110
2110
schema = schema ,
2111
2111
ref = ref ,
@@ -2154,7 +2154,7 @@ def fn(v: str, info: core_schema.ValidationInfo) -> str:
2154
2154
serialization: Custom serialization schema
2155
2155
"""
2156
2156
return _dict_not_none (
2157
- type = 'function-after' ,
2157
+ type = 'validator- function-after' ,
2158
2158
function = _dict_not_none (type = 'with-info' , function = function , field_name = field_name ),
2159
2159
schema = schema ,
2160
2160
ref = ref ,
@@ -2191,7 +2191,7 @@ class WithInfoWrapValidatorFunctionSchema(TypedDict, total=False):
2191
2191
2192
2192
2193
2193
class WrapValidatorFunctionSchema (TypedDict , total = False ):
2194
- type : Required [Literal ['function-wrap' ]]
2194
+ type : Required [Literal ['validator- function-wrap' ]]
2195
2195
function : Required [WrapValidatorFunction ]
2196
2196
schema : Required [CoreSchema ]
2197
2197
ref : str
@@ -2239,7 +2239,7 @@ def fn(
2239
2239
serialization: Custom serialization schema
2240
2240
"""
2241
2241
return _dict_not_none (
2242
- type = 'function-wrap' ,
2242
+ type = 'validator- function-wrap' ,
2243
2243
function = {'type' : 'no-info' , 'function' : function },
2244
2244
schema = schema ,
2245
2245
json_schema_input_schema = json_schema_input_schema ,
@@ -2291,7 +2291,7 @@ def fn(
2291
2291
serialization: Custom serialization schema
2292
2292
"""
2293
2293
return _dict_not_none (
2294
- type = 'function-wrap' ,
2294
+ type = 'validator- function-wrap' ,
2295
2295
function = _dict_not_none (type = 'with-info' , function = function , field_name = field_name ),
2296
2296
schema = schema ,
2297
2297
json_schema_input_schema = json_schema_input_schema ,
@@ -2302,7 +2302,7 @@ def fn(
2302
2302
2303
2303
2304
2304
class PlainValidatorFunctionSchema (TypedDict , total = False ):
2305
- type : Required [Literal ['function-plain' ]]
2305
+ type : Required [Literal ['validator- function-plain' ]]
2306
2306
function : Required [ValidationFunction ]
2307
2307
ref : str
2308
2308
json_schema_input_schema : CoreSchema
@@ -2341,7 +2341,7 @@ def fn(v: str) -> str:
2341
2341
serialization: Custom serialization schema
2342
2342
"""
2343
2343
return _dict_not_none (
2344
- type = 'function-plain' ,
2344
+ type = 'validator- function-plain' ,
2345
2345
function = {'type' : 'no-info' , 'function' : function },
2346
2346
ref = ref ,
2347
2347
json_schema_input_schema = json_schema_input_schema ,
@@ -2383,7 +2383,7 @@ def fn(v: str, info: core_schema.ValidationInfo) -> str:
2383
2383
serialization: Custom serialization schema
2384
2384
"""
2385
2385
return _dict_not_none (
2386
- type = 'function-plain' ,
2386
+ type = 'validator- function-plain' ,
2387
2387
function = _dict_not_none (type = 'with-info' , function = function , field_name = field_name ),
2388
2388
ref = ref ,
2389
2389
json_schema_input_schema = json_schema_input_schema ,
@@ -3965,10 +3965,10 @@ def definition_reference_schema(
3965
3965
'frozenset' ,
3966
3966
'generator' ,
3967
3967
'dict' ,
3968
- 'function-after' ,
3969
- 'function-before' ,
3970
- 'function-wrap' ,
3971
- 'function-plain' ,
3968
+ 'validator- function-after' ,
3969
+ 'validator- function-before' ,
3970
+ 'validator- function-wrap' ,
3971
+ 'validator- function-plain' ,
3972
3972
'default' ,
3973
3973
'nullable' ,
3974
3974
'union' ,
0 commit comments