jinja2 support
This commit is contained in:
44
prompts/api_documentation.md
Normal file
44
prompts/api_documentation.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# API Documentation: {{ api_name }}
|
||||
|
||||
Base URL: `{{ base_url }}`
|
||||
Version: {{ version }}
|
||||
|
||||
## Authentication
|
||||
{{ auth_method }}
|
||||
|
||||
## Endpoints
|
||||
|
||||
{% for endpoint in endpoints %}
|
||||
### {{ endpoint.method }} {{ endpoint.path }}
|
||||
|
||||
**Description:** {{ endpoint.description }}
|
||||
|
||||
{% if endpoint.params %}
|
||||
**Parameters:**
|
||||
{% for param in endpoint.params %}
|
||||
- `{{ param.name }}` ({{ param.type }}): {{ param.description }}{% if param.required %} *[Required]*{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if endpoint.request_body %}
|
||||
**Request Body:**
|
||||
```json
|
||||
{{ endpoint.request_body | tojson(indent=2) }}
|
||||
```
|
||||
{% endif %}
|
||||
|
||||
**Response:** `{{ endpoint.response_code }}`
|
||||
```json
|
||||
{{ endpoint.response_example | tojson(indent=2) }}
|
||||
```
|
||||
|
||||
---
|
||||
{% endfor %}
|
||||
|
||||
## Rate Limiting
|
||||
{{ rate_limit }} requests per {{ rate_limit_window }}
|
||||
|
||||
## Error Codes
|
||||
{% for error in error_codes %}
|
||||
- `{{ error.code }}`: {{ error.message }}
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user