API Design
高级开发最低上下文:32K
按契约优先原则设计 RESTful 和 GraphQL API。涵盖端点结构、请求与响应模式、错误处理、版本控制、分页、身份验证和速率限制,并生成 OpenAPI/Swagger 规范及实现脚手架。
此描述由机器自动翻译,尚未经过人工审核。
使用场景
- 根据需求设计新的 REST API 端点
- 生成 OpenAPI 规范
- 制定 API 版本控制策略
- 标准化错误响应
- 设计带解析器的 GraphQL 模式
示例提示词
Design a REST API for a task management system. Requirements: - CRUD operations for tasks (title, description, status, assignee, due_date) - Task filtering by status, assignee, and date range - Pagination with cursor-based navigation - Proper error responses with problem details (RFC 7807) - Authentication via Bearer token Deliverables: 1. Endpoint list with HTTP methods and paths 2. Request/response schemas for each endpoint 3. Error response catalog 4. OpenAPI 3.1 specification 5. Rate limiting recommendations
推荐模型
兼容工具
claude-codecursorgithub-copilotkiroany
模态
输入: text
→输出: code, text
相关 Skills
作者
OpenModels Community