55
src/docgen/templates/markdown.md.jinja2
Normal file
55
src/docgen/templates/markdown.md.jinja2
Normal file
@@ -0,0 +1,55 @@
|
||||
# {{ title }}
|
||||
|
||||
{% if description %}
|
||||
{{ description }}
|
||||
{% endif %}
|
||||
|
||||
**Version:** {{ version }}
|
||||
|
||||
---
|
||||
|
||||
{% for tag, tag_endpoints in grouped_endpoints.items() %}
|
||||
## {{ tag }}
|
||||
|
||||
{% for endpoint in tag_endpoints %}
|
||||
### {{ endpoint.method.value }} {{ endpoint.path }}
|
||||
|
||||
{% if endpoint.summary %}
|
||||
**{{ endpoint.summary }}**
|
||||
{% endif %}
|
||||
|
||||
{% if endpoint.description %}
|
||||
{{ endpoint.description }}
|
||||
{% endif %}
|
||||
|
||||
{% if endpoint.parameters %}
|
||||
#### Parameters
|
||||
|
||||
| Name | Location | Type | Required | Description |
|
||||
|------|----------|------|----------|-------------|
|
||||
{% for param in endpoint.parameters %}
|
||||
| `{{ param.name }}` | {{ param.location.value }} | {{ param.type }} | {{ 'Yes' if param.required else 'No' }} | {{ param.description }} |
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if endpoint.responses %}
|
||||
#### Responses
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
{% for response in endpoint.responses %}
|
||||
| {{ response.status_code }} | {{ response.description }} |
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if endpoint.file_path %}
|
||||
> **Source:** {{ endpoint.file_path }}{% if endpoint.line_number %}:{{ endpoint.line_number }}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
---
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
---
|
||||
|
||||
*Generated by DocGen-CLI*
|
||||
Reference in New Issue
Block a user