Loading...
Loading...
Automatically generate comprehensive backend API documentation in AGENTS.md format. Use when the user requests to: (1) Document backend API endpoints, (2) Update backend API specifications after code changes, (3) Create or refresh backend/AGENTS.md with complete API documentation including request/response schemas, business rules, and authentication details, (4) Generate API documentation from FastAPI route files
npx skill4agent add realroc/skills backend-api-documenterbackend/AGENTS.mdbackend/app/api/v1/*.pybackend/app/schemas/*.pybackend/CLAUDE.mdpython3 scripts/scan_api_routes.py ./backend1. Module Overview
Base路径: /api/v1/module
1.1 Endpoint Name
- 接口 (Interface)
- 描述 (Description)
- 请求头 (Request Headers)
- 请求体 (Request Body) with field descriptions
- 响应体 (Response Body) with field descriptions
- 错误响应 (Error Responses)
- 权限要求 (Authorization)
- 业务规则 (Business Rules)backend/AGENTS.md> **Inherits from**: [Root AGENTS.md](../AGENTS.md)field_name- `email` (string, optional): User email address, must be valid email format, max 255 characters
- `reward_amount` (float, required): Task reward amount, must be > 0, max 100000
- `status` (string, required): Task status, possible values: published/in_progress/completed/expired
- `location` (object, optional): GeoJSON Point format with coordinates [longitude, latitude]**请求头**:或
**权限要求**: 需要人类用户认证(JWT Token) 或 需要代理认证(API Key)**错误响应**:
验证失败(400):
```json
{
"success": false,
"code": "INVALID_INPUT",
"message": "输入参数无效",
"data": null
}{
"success": false,
"code": "UNAUTHORIZED",
"message": "未授权",
"data": null
}
### Business Rules Documentation
```markdown
**业务规则**:
- 只有任务所有者可以更新
- 创建任务时会锁定相应金额
- 任务发布后立即可见
- 评分范围: 1.0-5.0