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:

  1. Request headers and parameters (with types and required/optional)
  2. Request body schema (JSON with comments)
  3. Response schema for success (200) and common errors (400, 401, 403, 404, 500)
  4. cURL example
  5. JavaScript/TypeScript fetch example
  6. Rate limiting information
  7. 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