Static mock answers from an OpenAPI 3.x document
code.halowerk.com/v1/mock-from-openapi
Static mock answers from an OpenAPI 3.x document: per operation (or per given request) the status, headers and body a mock server would return, from examples or generated deterministically. No hosted mock endpoint is started; the service returns what a static mock server would answer. Response choice follows the common mock-server convention (Prism): the requested status (prefer_status) or the low
POST
https://code.halowerk.com/v1/mock-from-openapiUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://code.halowerk.com/v1/mock-from-openapi", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"requests":[{"method":"GET","path":"/pets/42"}],"spec":{"info":{"title":"Pets","version":"1"},"openapi":"3.0.3","paths":{"/pets/{id}":{"get":{"operationId":"getPet","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"]),
});
console.log(await res.json());Example input
{"requests":[{"method":"GET","path":"/pets/42"}],"spec":{"info":{"title":"Pets","version":"1"},"openapi":"3.0.3","paths":{"/pets/{id}":{"get":{"operationId":"getPet","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"required":["id","name"]