知识卡片
文档驱动开发
文档驱动开发先定义并记录 API 契约,再让服务端与客户端分别依据契约实现,最后用同一份文档检验双方。这样能更早定位接口理解不一致造成的集成错误。文档只有持续与真实行为对齐,才能发挥校验基准的作用。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Microservice APIs》封二《API 优先开发说明》(源文件:_epub-src/OEBPS/Text/IFC.htm)
- 结论依据:原文明确给出先设计并记录 API、再分别实现服务端与客户端、最后用文档验证两端的顺序,并指出它能减少集成失败、提高错误可见性。
- 原始内容:Documentation-driven development is an API-first development method in which you design and document the API first; then, you build the API server and the API client against the documentation; and finally, you use the API documentation to validate the server and client implementations.