{% load autodocs_filters %}
<div class="fields-wrapper json-container purple darken-2">
{
<ul class="field-list">
    {% for field in fields %}
    <li>
        <span>{{ field.name }}: {{ field.type }}{% if not forloop.last %},{% endif %}</span>
        {% if field.read_only or is_response_fields %}
            <span class="new badge green" data-badge-caption="">Read only</span>
        {% elif field.required %}
            <span class="new badge red" data-badge-caption="">Required</span>
        {% endif %}
        {% if field.choices %}
            <span class="new badge lime" data-badge-caption="">
                <a class='dropdown-button' data-activates=''>Choices</a>
                <ul id='' class='dropdown-content choices'>
                    <li><a class="choices-header">Value : Meaning</a></li>
                    <li class="divider"></li>
                    <li class="divider"></li>
                    {% for choice in field.choices.items %}
                        <li><a>{{ choice.0 }}  :  {{ choice.1 }}</a></li>
                    {% endfor %}
                </ul>
            </span>
        {% endif %}
        {% if field.sub_fields %}
            <div class="subfields-wrapper">
                <span class="new badge red" data-badge-caption="">Item structure</span>
                <div class="subfields">
                    {% include "drf_autodocs/components/fields_list.html" with fields=field.sub_fields %}
                </div>
            </div>
        {% endif %}
        {% if field.help_text %}
            <span class="new badge green" data-badge-caption="">
            <a class="tooltipped white-text" data-position="bottom" data-delay="50" data-tooltip="{{ field.help_text }}">Help Text</a>
            </span>
        {% endif %}
    </li>
    {% endfor %}
</ul>
}
</div>