2 个仓库
Mechanisms that verify outgoing server responses against a defined schema to ensure contract compliance.
Distinguishing note: The candidates are unrelated; this specific capability of verifying the server's own output against a spec is a distinct web development concern.
Explore 2 awesome GitHub repositories matching web development · API Response Validations. Refine with filters or upvote what's useful.
Connexion 是一个规范驱动的框架,用于构建自动将 OpenAPI 规范映射到应用逻辑的 API。它使用这些规范来自动化路由、请求验证和响应序列化,并通过操作 ID 将 API 操作链接到后端处理函数。 该项目通过提供一个模式驱动的 Mock 服务器来区分开来,该服务器使用规范中的示例响应来模拟 API 行为,而无需后端逻辑。它还包括一个动态文档托管系统,将 API 规范转换为实时交互式控制台,用于探索和测试端点。 该框架涵盖了广泛的功能领域,包括通过基于中间件的身份验证和作用域验证实施安全性、可插拔的请求和响应验证逻辑,以及向类型化函数参数自动注入参数。它还提供了用于应用生命周期管理、自定义中间件集成和请求模拟测试的实用工具。 该项目可用于引导独立 Web 应用,或包装在现有框架周围以添加规范驱动的功能。
Verifies that the data returned by the server conforms to the schema promised in the API specification in the product.
Dredd 是一个 HTTP API 合约测试工具和规范验证器。它作为一个自动化测试运行器,验证实时后端服务器的行为是否符合正式的 API 规范文档。 该系统通过将规范定义转换为 HTTP 请求,并将生成的响应与定义的 JSON 模式进行匹配,执行语言无关的 API 测试。此过程确保服务器实现无论使用何种编程语言构建,都能保持与设计合约的一致性。 该工具通过编排外部设置和清理脚本来管理测试生命周期。这些语言无关的钩子(hooks)允许配置测试环境并在各个验证测试之间维护状态。
Validates that real server responses comply with the definitions provided in the API specification.