model_ser_schema
Returns a schema for serialization using a model.
def model_ser_schema(
cls: type[Any],
schema: CoreSchema
) - > ModelSerSchema
Returns a schema for serialization using a model.
Parameters
| Name | Type | Description |
|---|---|---|
| cls | type[Any] | The expected class type, used to generate warnings if the wrong type is passed during serialization |
| schema | CoreSchema | The internal core schema used to define how the model's dictionary of data is serialized |
Returns
| Type | Description |
|---|---|
ModelSerSchema | A configuration object defining how a specific class type and its internal schema should be serialized. |