Markdown templates: structure and placeholders
How to write Markdown templates for API docs and test evidence reports.
Two flavors, one engine
Capydox renders Markdown + CSS + PDF with {{name}} placeholders. By templateKind:
| DOCUMENTATION | EVIDENCE | |
|---|---|---|
| Goal | API reference | Test report |
| Key placeholders | {{endpoints}}, {{introduction}} | {{testCaseTable}}, {{#testCases}} |
| Input | Collection / OpenAPI | Collection + execution JSON |
Live list in the template creator or API:
GET /api/templates/placeholders?kind=DOCUMENTATION
GET /api/templates/placeholders?kind=EVIDENCE&evidenceType=REGRESSION
DOCUMENTATION template
Recommended structure: title → {{tableOfContents}} → {{introduction}} → {{endpoints}} → {{conclusion}}.
EVIDENCE template
Official templates use Field/Value tables, --- separators and {{#testCases}}…{{/testCases}} blocks with per-case placeholders ({{httpMethod}}, {{responseBody}}, {{validationsTable}}).
Document-level: {{totalTests}}, {{passedTests}}, {{responseTitle}} (smoke), {{confidentialityBlock}}.
PDF formatting
Leave a blank line before pipe tables and fenced code; separate horizontal rules --- with blank lines. Capydox preprocesses Markdown before PDF export.
See also: Evidence templates, PDF export, Tutorial.