The Powerduck Blog

API engineering, from the spec out

Product updates, engineering notes, and guides for designing, debugging, testing, mocking, and serving MCP tools from one OpenAPI spec.

Browse the guides
AI Agents 2 min read

Your AI codes fast. The integration is still wrong.

Generated screens fail on limit versus pageSize, data.records versus data.items, cents versus dollars. The fix is not a better prompt; it is letting the agent query the real contract and verify against real responses.

Read article
AI Agents 2 min read

Switching AI tools shouldn't mean reintroducing your API

Every new coding assistant starts with the same ritual: paste the docs, explain the fields, warn about stale versions. A local spec served over MCP makes that context permanent.

Read article
mocking 5 min read

Mocking APIs for frontend development: MSW vs Prism vs spec-driven mocks

MSW intercepts requests inside the browser and shines in component tests; Prism serves a spec over HTTP and validates contracts; spec-driven workspaces add journeys and streams. Here is where each belongs and how teams combine them without maintaining three sets of fixtures.

Read article
Webhooks 4 min read

How to document webhooks in OpenAPI 3.1 (with signatures, retries, and examples)

Webhooks are reverse APIs: your server is the client, so the documentation has to cover payloads, delivery ordering, retries, signature verification, and endpoint registration. OpenAPI 3.1 made webhooks top-level citizens — here is a complete, consumer-ready webhook definition.

Read article
ai 3 min read

When AI writes your system, who defines what done means?

A booking app built from one prompt can pass every visual check and still fail on time zones, double bookings, and stale cancel responses. Teams need a contract both people and tools can query, change, and verify.

Read article
workflow 3 min read

A curl command is not an API handoff

A request that runs is the start of a handoff, not the end of one. Import the curl, capture the missing context, and promote what you learned back into the specification.

Read article
SSE 4 min read

How to test Server-Sent Events endpoints: curl, Postman, and spec-driven SSE testing

SSE looks like HTTP until you try to test it: the connection stays open, events have names and ids, heartbeats hide disconnects, and ordinary API clients hang. Here is how to test streams with curl, what Postman does and does not do, and how to make SSE scenarios repeatable from an OpenAPI spec.

Read article