# Metadata annotation macros for documentation and type information

{%- macro documented_field(name, doc, field_type, default) %}
  {{ name }}
    | doc "{{ doc }}"
  : {{ field_type }}
{%- if default %}
    = {{ default }}
{%- endif %}
{%- endmacro %}

{%- macro optional_documented(name, doc, field_type) %}
  {{ name }}
    | doc "{{ doc }}"
    | optional
  : {{ field_type }}
{%- endmacro %}

{%- macro required_field(name, field_type) %}
  {{ name }} : {{ field_type }},
{%- endmacro %}

{%- macro deprecated(name, field_type, reason) %}
  # DEPRECATED: {{ reason }}
  {{ name }} : {{ field_type }},
{%- endmacro %}
