← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 10296.b.1.a · 生成模型:未记录

静态治理与运行一致性

理解等级:中级

Lint 检查一份静态契约是否符合可编码的风格和约束。破坏性变更检查比较前后两个版本能否保持兼容。契约一致性测试则调用已实现服务,把实际状态和响应结构与契约对照。这三类检查的输入与验证目标不同,设计修改后可先重跑静态检查,部署到测试环境后再做运行验证。

对线上形状的判断需要请求与响应证据,参见[[OpenAPI模式测试检查什么]]。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 什么是 APIOps 1.5 Key principles of APIOps with OpenAPI · 查看原书依据

      After you’ve implemented your API, you need to validate that the implemented API matches the agreed-upon design in the OpenAPI definition. You can run API conformance tests—tests automatically generated from the OpenAPI definition file—to validate the API. These tests check that your API definition is correct by exercising the operations defined on it and checking that the responses received match what is specified in the definition. This includes checking response object schemas for correctness and checking for unimplemented operations.

    参考来源

    - 位置:《Automating API Delivery APIOps with OpenAPI》《第 01 章 什么是 APIOps》(1.5 Key principles of APIOps with OpenAPI;来源项目 book-source,extracted/Automating API Delivery APIOps with OpenAPI/_epub-src/OEBPS/Text/chapter-1.xhtml#p114) - 结论依据:原文说明一致性测试依据契约实际调用接口并核对响应,以及未实现操作等可发现问题。 - 原始内容:After you’ve implemented your API, you need to validate that the implemented API matches the agreed-upon design in the OpenAPI definition. You can run API conformance tests—tests automatically generated from the OpenAPI definition file—to validate the API. These tests check that your API definition is correct by exercising the operations defined on it and checking that the responses received match what is specified in the definition. This includes checking response object schemas for correctness and checking for unimplemented operations.