Class SchemaAlias
Marks a type alias of a discriminated union shared by every namespace referring to it.
Annotating the value of a union alias with an instance generates the union under the alias
name in the namespace declared by the module of the alias. The alias is declared with the
type statement, or with TypeAliasType before Python 3.12. Without the marker, the union
is generated as a local union in each namespace referring to it.
Constructors
View SourceSchemaAlias
Declares the type name of the union, if it is defined elsewhere.
Declaration
SchemaAlias(*, sgen_typename: str | None = None)
Parameters
| Type | Name | Description |
|---|---|---|
| str | None | sgen_typename |
The fully qualified type name of a union defined elsewhere. |