{%- match kind -%} {%- when PySchemaKind::Class with (fields) -%} class {{ name }}(BaseModel): {%- if fields.is_empty() %} pass {%- else %} {%- for f in fields %} {{ f.ident }}: {{ f.ty }}{% if f.append_none %} | None{% endif %}{% if f.optional %} = None{% endif %} {%- endfor %} {%- endif %} {%- when PySchemaKind::ListOf with (inner) -%} {{ name }} = list[{{ crate::emit::python::py_type(inner) }}] {%- when PySchemaKind::Literal with (variants) -%} {{ name }} = Literal[{% for v in variants %}{% if !loop.first %}, {% endif %}"{{ v }}"{% endfor %}] {%- when PySchemaKind::Alias with (inner) -%} {{ name }} = {{ crate::emit::python::py_type(inner) }} {%- endmatch -%}