找出契约测试里的 bug

来自 API 优先设计
OpenAPI 3.2.0 / Node 24 进阶 4分钟 找出 1处问题

找出这段生成测试中的契约验证缺口。

JavaScript
async function verifyCreated(response) {
  const body = await response.json();
  if (typeof body.id !== "string") {
    throw new Error("missing order id");
  }
  return true;
}
在试验场中打开
报告错误