{"uid":"cap_woDGBPyNL-XmlSx4qPQvW","slug":"openapi-mock-response-synthesizer-3775e78e","name":"OpenAPI Mock Response Synthesizer","description":"Synthesize a JSON response body for one operation + status code in an OpenAPI 3.x or Swagger 2.x spec. Locate the operation by operationId or method+path. Pick the response by explicit `status`, else the first 2xx, else the first documented response. Generation precedence: operation-level `example`/`examples` > schema `example` > recursive type-inferred walk (objects walk properties, arrays return [mock(items)], enums return the first value, $ref is surfaced literally).","url":"https://agent402.tools/api/openapi-mock-response","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"path":{"description":"Path template (use with `method` if no operationId)"},"spec":{"description":"OpenAPI/Swagger document (object or JSON string)"},"method":{"description":"HTTP method (use with `path` if no operationId)"},"status":{"description":"Response status to mock (defaults to first 2xx)"},"operationId":{"description":"operationId to mock (preferred)"}}},"responseSchema":{"type":"json","example":{"mock":{"id":"u_42","name":"Alice","roles":["admin"],"active":true},"source":"generated","status":"200","contentType":"application/json"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_x4KycOB6rRvNuLRxjtG1K","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Synthesizes a realistic JSON response body for a specified operation and status code in an OpenAPI 3.x or Swagger 2.x specification","exampleAgentPrompt":"Can you generate a mock JSON response for the 'createUser' operation in this OpenAPI spec — use the 201 status code? Here's the spec: {paste spec}","exampleUseCases":null,"resultDescription":"A synthesized JSON object representing a realistic response body for the matched operation and status code, derived from the response schema defined in the OpenAPI or Swagger document.","failureModes":["operationId not found in spec — returns error indicating no matching operation","no matching status code found and no 2xx response defined — returns error","spec is malformed or unparseable JSON/YAML — returns parse error","path+method combination does not exist in spec — returns not-found error","response schema has no defined structure — returns empty or minimal mock"],"whenToPreferThis":"Use this endpoint when you need realistic, schema-conformant mock response data from an existing OpenAPI or Swagger specification without calling the real API — ideal for testing, documentation, and development workflows where you need example payloads that match a known spec contract.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:04.657Z","isFirstParty":false}