{#
    Warn people opening the resulting file it is generated using this template
    and the accompanying script.
-#}
////
    Do not modify this file directly, it is automatically generated by combining
    the Python script `docs/utils/gen-conf-ref.py` and the template
    `docs/utils/conf-ref.adoc.j2`. Please refer to the Python script comments
    to discover how it is used.
////
{#
    Macro to represent the type of an object attribute
#}

{% for section in definition.sections %}

== `{{ section.name }}`
{%- if section.doc %}

{{ section.doc }}
{%- endif %}

[cols="2l,1,5a,^1"]
|===
|Parameter|Type|Description|Required

{% for parameter in section.parameters %}
|{{ parameter.name }}
|{{ parameter._type }}{% if parameter.content %}[{{ parameter.content }}]{% endif %}
|{{ parameter.doc }}
{% if parameter.deprecated %}
WARNING: This parameter is *deprecated* in favor of `[{{ parameter.deprecated.section }}]` > `{{ parameter.deprecated.parameter }}`.
{% endif %}
{% if parameter.example != None %}
{%- if parameter.example.__class__.__name__ == 'list' %}
*Example:*

{% for example in parameter.example %}
* `{{ example }}`
{% endfor %}
{%- else %}
*Example:* `{{ parameter.example }}`
{%- endif %}
{% endif %}
{% if parameter.choices %}
*Choices:*

{% for choice in parameter.choices %}
* `{{ choice }}`
{%- endfor %}
{% endif %}
{%- if parameter.default != None %}
{% if parameter.default.__class__.__name__ == 'list' %}
*Default:*

{% for default in parameter.default %}
* `{{ default }}`
{% endfor %}
{% else %}
{%- if parameter._type == "uri" %}
{%- set default = parameter.default.geturl() %}
{%- else %}
{%- set default = parameter.default %}
{%- endif %}
*Default:* `{{ default }}`
{% endif %}
{%- else %}
_No default value_
{% endif %}
|{% if parameter.required %}✅{% else %}-{% endif %}
{% endfor %}

|===

{% endfor %}
