Memory Appendix
Api Doc Format
Strict format for every API endpoint documentation page — path, request JSON, request params table, response JSON, enums, response table, error tabs
Source memory file:
feedback_api_doc_format.md· Category: Feedback / working-preference This is a verbatim dump of Claude's persistent memory for the Octopus project. Rendered inside a code block so nothing is altered.
---
name: API Documentation Page Format
description: Strict format for every API endpoint documentation page — path, request JSON, request params table, response JSON, enums, response table, error tabs
type: feedback
---
Every API documentation page must follow this exact structure:
1. **Path** — endpoint method and URL first
2. **Request JSON** — full curl/JSON example
3. **Request Parameters Table** — columns: Key, Data Type, Required, Description
4. **Response JSON** — full success response example
5. **Enumerations** — list any enum values that appear in the response
6. **Response Table** — columns: Key, Data Type, Description (include enum values in description)
7. **Error Cases** — listed after success response, in **tabs**. Tab name = error case name. Tab content = response JSON + explanation.
**Why:** User wants consistent, scannable API docs. Every page documents a single endpoint. Errors must be in tabs, not stacked vertically.
**How to apply:** Follow this format for every API endpoint doc page. Read the Go handler code thoroughly to extract exact field names, types, validations, enums, and all error branches before writing.