2023-11-28 14:29:16 -08:00
|
|
|
from typing import Dict, Any, Union, Type, TypeVar
|
2023-11-29 00:39:14 -08:00
|
|
|
from pydantic import RootModel
|
2023-11-28 14:16:05 -08:00
|
|
|
|
2023-11-28 23:50:50 -08:00
|
|
|
|
2023-11-29 00:39:14 -08:00
|
|
|
{{name}} = RootModel[Union[
|
2023-11-28 14:16:05 -08:00
|
|
|
{% for type in types %}
|
|
|
|
{{type.name}},
|
|
|
|
{% endfor %}
|
2023-11-29 00:39:14 -08:00
|
|
|
]]
|
2023-11-28 23:50:50 -08:00
|
|
|
|