Back to Prompts
API Documentation Generator
从端点描述生成全面的 API 文档,包含示例、错误码和认证详情
Code Assist4.62.9K copiesby @devdocs
Prompt Template
Generate comprehensive API documentation for the following endpoint:
Endpoint: [METHOD] [PATH] Description: [DESCRIPTION] Authentication: [AUTH_TYPE]
Include:
- Request headers and parameters (with types and required/optional)
- Request body schema (JSON with comments)
- Response schema for success (200) and common errors (400, 401, 403, 404, 500)
- cURL example
- JavaScript/TypeScript fetch example
- Rate limiting information
- Changelog notes
Format as clean Markdown suitable for a docs site.
Parameters
[METHOD]HTTP method
Default: POST
[PATH]API path
Default: /api/v1/users
[DESCRIPTION]What the endpoint does
Default: Create a new user account
[AUTH_TYPE]Authentication method
Default: Bearer token
Claude CodeChatGPTCursor
#api#documentation#openapi#rest