知识卡片
以用户故事约束CRUD
列出每条故事所需的操作、前提和权限,再选择有用的 CRUD 子集. 如果故事没有直接对应动作,检查它能否用一种状态变化或关系资源表达。没有故事要求的操作可先留在接口之外。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Creating an API design using OpenAPI 10.3 The CRUD approach to API operations · 查看原书依据
You might now conclude that API design is about following the mechanical process of taking your models, adding collection and resource endpoints for each of them, and specifying all CRUD operations—GET and POST for collection endpoints, and GET, PUT, and DELETE for
参考来源
- 位置:《Designing APIs with Swagger and OpenAPI》第10章《Creating an API design using OpenAPI》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch10.htm,阅读块 165)
- 结论依据:原文指出机械生成的 CRUD 可能遗漏实际需求,同时暴露多余操作。
- 原始内容:You might now conclude that API design is about following the mechanical process of taking your models, adding collection and resource endpoints for each of them, and specifying all CRUD operations—GET and POST for collection endpoints, and GET, PUT, and DELETE for