{% macro accordian(domain, paths) -%}

/{{ domain }}

{% for path, method in paths|dictsort %} {% for method, attrs in method.items() %} {{ method_details(path, method, attrs) }} {% endfor %} {% endfor %}
{%- endmacro %} {% macro method_details(path, method, attrs) -%} {% set pathid = path|replace("{", "")|replace("}", "")|replace("/", "") %}
{{ method }} {{ path }} {{ attrs.label }}
{% if attrs.params %}
{{ params_table(attrs.params) }}
{%- endif %}
{%- endmacro %} {% macro params_table(params) -%} {% for param in params %} {% endfor %}
Parameter Type Required Other Attributes
{{ param.pop('name') }} {{ param.pop('type') }} {{ param.pop('required') }} {% for key, value in param.items() %} {{ key }}: {{ value }}
{% endfor %}
{%- endmacro %}