event_schema

event_schema(cls: type[T]) -> type[T] | type[EventSchemaObject]
Use this decorator to annotate your class as an event schema that can be used to represent events between other schemas.

Parameters

cls
type[T]
required
The class to be converted into an event schema.
Returns: type[T] | type[EventSchemaObject] - The decorated class, now enhanced with event schema capabilities.