Skip to content

Commit 1aa1963

Browse files
committed
Merge pull request #24 from jwg4/Get_links
Add a link to GET endpoints without arguments.
2 parents 694a345 + f44acc7 commit 1aa1963

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

flask_autodoc/templates/autodoc_default.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,15 @@ <h1>
5757
<div class="mapping">
5858
<a id="rule-{{doc.rule|urlencode}}" class="rule"><h2>{{doc.rule|escape}}</h2></a>
5959
<ul class="methods">
60-
{% for method in doc.methods -%}
61-
<li class="method">{{method}}</li>
62-
{% endfor %}
60+
{% for method in doc.methods -%}
61+
{% if method == 'GET' and doc.args == ['None'] %}
62+
<a href="{{doc.rule}}" class="getmethod">
63+
<li class="method">{{method}}</li>
64+
</a>
65+
{% else %}
66+
<li class="method">{{method}}</li>
67+
{% endif %}
68+
{% endfor %}
6369
</ul>
6470
<ul class="arguments">
6571
{% for arg in doc.args %}
@@ -73,4 +79,4 @@ <h1>
7379
</div>
7480
{% endfor %}
7581
</body>
76-
</html>
82+
</html>

0 commit comments

Comments
 (0)