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 the structure and serialization logic of the model's dictionary |
Returns
| Type | Description |
|---|---|
ModelSerSchema | A configuration object defining how a model class and its internal schema should be serialized |