OpenAPI and documenting APIs people can actually use
Why a machine-readable API spec beats a slide deck, and how to keep OpenAPI honest as the API changes.
If it is not in the spec, it is a rumour
OpenAPI (formerly Swagger) is a document that lists paths, parameters, request bodies, responses and security. Good specs let people generate types and mock servers. Bad specs are a screenshot of last year’s API.
What to include
- Auth scheme (API authentication).
- Error shape and the status codes you really return.
- Pagination (pagination and rate limits).
- Examples that would pass your tests.
Keep it generated or reviewed
The durable pattern is “spec and code cannot drift”: generate one from the other, or fail CI when they differ. See documentation as a product.
Related
Last verified: August 2026. Technology and pricing change — always confirm current details with the vendor.