diff --git a/templates/api_v2/api_documentation.html b/templates/api_v2/api_documentation.html index 7e4f97c..103f137 100644 --- a/templates/api_v2/api_documentation.html +++ b/templates/api_v2/api_documentation.html @@ -2,151 +2,88 @@ {% load i18n %} {% block content %} -
-
-

{% trans 'API Documentation' %}

+
+
+

{% trans 'API Documentation' %}

-
- {% for doc in docs %} -
-
-
- -
-
+ {% for doc in docs %} +
+
+
+ {% for method in doc.methods %} + {{ method }} + {% endfor %} + /api/v2/{{ doc.url_pattern }} +
+
+
+

{{ doc.summary }}

-
-
-

{{ doc.summary }}

+

{% trans 'Authentication' %}: {{ doc.auth }}

-

{% trans 'Authentication' %}: {{ doc.auth }}

- - - {% if doc.params %} -
- -
- - - - - - - - - - - - {% for param in doc.params %} - - - - - - - - {% endfor %} - -
{% trans 'Name' %}{% trans 'In' %}{% trans 'Type' %}{% trans 'Required' %}{% trans 'Description' %}
{{ param.name }}{{ param.in }}{{ param.type }} - {% if param.required %} - {% trans 'Yes' %} - {% else %} - {% trans 'No' %} - {% endif %} - - {{ param.description }} - {% if param.example %} -
{% trans 'Example' %}: {{ param.example }} - {% endif %} -
-
-
+ {% if doc.params %} +
{% trans 'Parameters' %}
+ + + + + + + + + + + + {% for param in doc.params %} + + + + + + + + {% endfor %} + +
{% trans 'Name' %}{% trans 'In' %}{% trans 'Type' %}{% trans 'Required' %}{% trans 'Description' %}
{{ param.name }}{{ param.in }}{{ param.type }} + {% if param.required %} + {% trans 'Yes' %} + {% else %} + {% trans 'No' %} {% endif %} - - - {% if doc.returns %} -
- -
-
    - {% for ret in doc.returns %} -
  • - {{ ret.status }} -
    {{ ret.body|pprint }}
    -
  • - {% endfor %} -
-
-
+
+ {{ param.description }} + {% if param.example %} +
{% trans 'Example' %}: {{ param.example }} {% endif %} +
+ {% endif %} - - {% if doc.examples %} -
- -
- {% for key, example in doc.examples.items %} -
-
- {{ key }} -
{{ example|pprint }}
-
-
- {% endfor %} -
-
- {% endif %} -
-
+ {% if doc.returns %} +
{% trans 'Returns' %}
+
    + {% for ret in doc.returns %} +
  • + {{ ret.status }} +
    {{ ret.body|pprint }}
    +
  • + {% endfor %} +
+ {% endif %} + + {% if doc.examples %} +
{% trans 'Examples' %}
+ {% for key, example in doc.examples.items %} +
+
+ {{ key }} +
{{ example|pprint }}
+
{% endfor %} + {% endif %}
+ {% endfor %}
- - +
{% endblock %} \ No newline at end of file