diff --git a/src/docgen/templates/endpoint.html.jinja2 b/src/docgen/templates/endpoint.html.jinja2 new file mode 100644 index 0000000..49d6685 --- /dev/null +++ b/src/docgen/templates/endpoint.html.jinja2 @@ -0,0 +1,84 @@ +
+
+ {{ endpoint.method.value }} +
+
+ {{ endpoint.path }} +
+
+ {{ endpoint.summary or endpoint.description or '' }} +
+
+
+ +
+ {% if endpoint.description %} +
+

Description

+

{{ endpoint.description }}

+
+ {% endif %} + + {% if endpoint.parameters %} +
+

Parameters

+ + + + + + + + + + + + {% for param in endpoint.parameters %} + + + + + + + + {% endfor %} + +
NameLocationTypeRequiredDescription
{{ param.name }}{{ param.location.value }}{{ param.type }}{{ 'Yes' if param.required else 'No' }}{{ param.description }}
+
+ {% endif %} + + {% if endpoint.responses %} +
+

Responses

+
+ {% for response in endpoint.responses %} +
+ + {{ response.status_code }} + + {{ response.description }} +
+ {% endfor %} +
+
+ {% endif %} + +
+

Try it out

+
+ +
+ +
+
+ + {% if endpoint.file_path %} +
+ Defined in: {{ endpoint.file_path }}{% if endpoint.line_number %}:{{ endpoint.line_number }}{% endif %} +
+ {% endif %} +