Skip to content

Schema model map

get_associated_model_class(schema)

get_parent_schema_class(schema)

Get the parent schema class for a given schema.

schema_class_parents_map() cached

Get a mapping of schema classes to their parent schema classes.

This is used to determine the parent schema class for a given schema class, which is useful for determining the correct model class to use when creating a new model from a schema.

RETURNS DESCRIPTION
dict[type[ConfigSchemaBase], type[ConfigSchemaBase] | None]

dict[type[ConfigSchemaBase], type[ConfigSchemaBase]]: A mapping of schema classes to their parent schema classes