rebuild_dataclass
Try to rebuild the pydantic-core schema for the dataclass.
def rebuild_dataclass(
cls: type[PydanticDataclass],
force: bool = False,
raise_errors: bool = True,
_parent_namespace_depth: int = 2,
_types_namespace: MappingNamespace | None = None
) - > bool | None
Try to rebuild the pydantic-core schema for the dataclass. This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.
Parameters
| Name | Type | Description |
|---|---|---|
| cls | type[PydanticDataclass] | The class to rebuild the pydantic-core schema for. |
| force | bool = False | Whether to force the rebuilding of the schema, defaults to False. |
| raise_errors | bool = True | Whether to raise errors, defaults to True. |
| _parent_namespace_depth | int = 2 | The depth level of the parent namespace, defaults to 2. |
| _types_namespace | `MappingNamespace | None` = None |
Returns
| Type | Description |
|---|---|
| `bool | None` |