uuid_schema
Generates a UUID schema configuration by mapping provided version, strictness, and metadata parameters into a dictionary-based schema structure.
def uuid_schema(
version: Literal[1, 3, 4, 5, 6, 7, 8] | None = None,
strict: bool | None = None,
ref: str | None = None,
metadata: dict[str, Any] | None = None,
serialization: SerSchema | None = None
) - > UuidSchema
Generates a schema for validating and serializing UUID values, allowing for specific version constraints and strictness settings.
Parameters
| Name | Type | Description |
|---|---|---|
| version | `Literal[1, 3, 4, 5, 6, 7, 8] | None` = None |
| strict | `bool | None` = None |
| ref | `str | None` = None |
| metadata | `dict[str, Any] | None` = None |
| serialization | `SerSchema | None` = None |
Returns
| Type | Description |
|---|---|
UuidSchema | A dictionary-based schema definition for a UUID type, compatible with Pydantic's CoreSchema. |