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

{% trans 'API Documentation' %}

+
+
+

{% trans 'API Documentation' %}

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

{{ doc.summary }}

+
+ {% for doc in docs %} +
+
+
+ +
+
-

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

+
+
+

{{ doc.summary }}

- {% 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' %} +

{% 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 %} +
+
+
{% endif %} -
- {{ param.description }} - {% if param.example %} -
{% trans 'Example' %}: {{ param.example }} + + + {% if doc.returns %} +
+ +
+
    + {% for ret in doc.returns %} +
  • + {{ ret.status }} +
    {{ ret.body|pprint }}
    +
  • + {% endfor %} +
+
+
{% endif %} -
- {% 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 }}
+ + {% if doc.examples %} +
+ +
+ {% for key, example in doc.examples.items %} +
+
+ {{ key }} +
{{ example|pprint }}
+
+
+ {% endfor %} +
+
+ {% endif %} +
+
-
{% endfor %} - {% endif %}
- {% endfor %}
-
+ + {% endblock %} \ No newline at end of file