buffalo_core.schema.SchemaFieldTree
- class buffalo_core.schema.SchemaFieldTree(name, type_name, optional, docstring, metadata, object_schema=None, item_type_name=None, item_schema=None)[source]
Bases:
objectTree node describing one dataclass field.
Notes
This object keeps the structure domain-light. It reports only the field shape, nested dataclass children, optionality, and the stored field metadata contract.
Attributes
Field name on the parent dataclass.
Display-friendly type name for the field.
Whether the field accepts
None.Best available short field documentation text.
Structured machine-readable field metadata.
Nested dataclass schema when the field value is a dataclass object.
Display-friendly item type name for list, tuple, or mapping values.
Nested schema for collection items when the item type is a dataclass.
- name: str
Field name on the parent dataclass.
- type_name: str
Display-friendly type name for the field.
- optional: bool
Whether the field accepts
None.
- docstring: str | None
Best available short field documentation text.
- metadata: SchemaFieldMetadata
Structured machine-readable field metadata.
- object_schema: SchemaClassTree | None
Nested dataclass schema when the field value is a dataclass object.
- item_type_name: str | None
Display-friendly item type name for list, tuple, or mapping values.
- item_schema: SchemaClassTree | None
Nested schema for collection items when the item type is a dataclass.