buffalo_core.SchemaCondition

class buffalo_core.SchemaCondition(path, operator, value=None, message=None)[source]

Bases: object

Structured conditional UI rule attached to one schema field.

Notes

Conditions remain domain-light so downstream projects can interpret them for GUI visibility, editability, or other editor workflows.

Methods

to_metadata()

Return the plain metadata mapping stored in dataclass fields.

Attributes

path

Path expression identifying the controlling schema value.

operator

Predicate operator such as equals or non_empty.

value

Optional comparison value for the condition.

message

Optional explanatory message for the condition.

path: str

Path expression identifying the controlling schema value.

operator: str

Predicate operator such as equals or non_empty.

value: object | None

Optional comparison value for the condition.

message: str | None

Optional explanatory message for the condition.

to_metadata()[source]

Return the plain metadata mapping stored in dataclass fields.

Return type:

SchemaFieldMetadata