首页/ AI 技能 / @skilllib/skill-2117939930272412739
Skill站外收录 @skilllib/skill-2117939930272412739

doc-generator

自动从源代码中提取接口定义,生成结构清晰、内容完整的 API 文档,涵盖端点说明、参数列表、响应示例、多语言调用代码、错误码解释及认证与集成指引,适用于开发协作与第三方接入场景。

0.0 (0) 41 次安装 原作者 编程导航
收录于 2026-01-22
文档处理 AI 技能

Skills.MD

# API Documentation Generator Skill ## Generates - OpenAPI/Swagger specifications - API endpoint documentation - SDK usage examples - Integration guides - Error code references - Authentication guides ## Documentation Structure ### For Each Endpoint ```markdown ## GET /api/v1/users/:id ### Description Brief explanation of what this endpoint does ### Parameters | Name | Type | Required | Description | |------|------|----------|-------------| | id | string | Yes | User ID | ### Response **200 Success** ```json { "id": "usr_123", "name": "John Doe", "email": "john@example.com", "created_at": "2025-01-15T10:30:00Z" } ``` **404 Not Found** ```json { "error": "USER_NOT_FOUND", "message": "User does not exist" } ``` ### Examples **cURL** ```bash curl -X GET "https://api.example.com/api/v1/users/usr_123" \ -H "Authorization: Bearer YOUR_TOKEN" ``` **JavaScript** ```javascript const user = await fetch('/api/v1/users/usr_123', { headers: { 'Authorization': 'Bearer token' } }).then(r => r.json()); ``` **Python** ```python response = requests.get( 'https://api.example.com/api/v1/users/usr_123', headers={'Authorization': 'Bearer token'} ) user = response.json() ``` ```

评论 0

还没有评论,来抢沙发。