{%- if description %}
# {{ description | replace('\n', '\n# ') }}
{%- endif %}
{%- if fields|length > 1 %}
type {{ class_name }} = Union[
{%- for field in fields %}
    '{{ field.name }}',
{%- endfor %}
]{% elif fields %}
type {{ class_name }} = {{ fields[0].name }}{% else %}
type {{ class_name }} = {{ base_class }}{% endif %}