model_json_schema(
model: TypeBaseModel,
) -> dict[str, Any]| Name | Type | Description |
|---|---|---|
model* | TypeBaseModel | The Pydantic model class. |
Return the JSON schema of a Pydantic model class of either major version.
Dispatches to the correct method for Pydantic v1 (schema) or v2
(model_json_schema), so callers holding a TypeBaseModel don't have to
branch on the model's version themselves.