Development
API 响应契约校验器
将真实 API 响应 JSON 与 OpenAPI 3.x 中声明的 response schema 对照校验
html· HTML 结果打开工具
快速开始
用三种语言从你的代码中调用此工具。
cURL
curl -X POST 'https://api.elysiatools.com/zh/api/tools/api-response-contract-validator' \
-H 'Content-Type: application/json' \
-d '{"openApiSpec":"openapi: 3.0.3\npaths:\n /users/{id}:\n get:\n responses:\n \"200\":\n description: ok\n content:\n application/json:\n schema:\n type: object\n required: [id, name]\n properties:\n id: { type: integer }\n name: { type: string }\n active: { type: boolean }","responseJson":"{\"id\":\"1\",\"active\":\"yes\"}","path":"/users/42","method":"get","statusCode":"200","specFormat":"yaml","disallowAdditionalProperties":true}'