Spot the bug in the contract test

from API-first design
OpenAPI 3.2.0 / Node 24 intermediate 4 min 1 issue to find

Find the contract-verification gap in this generated test.

JavaScript
async function verifyCreated(response) {
  const body = await response.json();
  if (typeof body.id !== "string") {
    throw new Error("missing order id");
  }
  return true;
}
Open in playground
Report an error