vuecore.utils.docs_utils module

vuecore.utils.docs_utils module#

vuecore.utils.docs_utils.document_pydant_params(model: Type[BaseModel])[source]#

Decorator to add Pydantic model parameters to a function’s docstrings.

Parameters:

model (Type[BaseModel]) – The Pydantic model class whose fields should be documented.

Returns:

A decorator function that modifies the docstring of the target function.

Return type:

function

vuecore.utils.docs_utils.get_all_model_fields(model: Type[BaseModel]) Dict[str, Field][source]#

Extract all fields from a Pydantic model, including inherited ones.

Parameters:

model (Type[BaseModel]) – The Pydantic model class from which to extract fields.

Returns:

A dictionary with field names as keys and field information as values.

Return type:

Dict[str, Any]

vuecore.utils.docs_utils.get_type_string(annotation: Any) str[source]#

Helper to get a clean type string from a type annotation.

Parameters:

annotation (Any) – The type annotation to process.

Returns:

A simplified string representation of the type.

Return type:

str