Agent Wranglers

API-48Recommended

Generate docs and clients from the contract

Build the reference docs from the OpenAPI file, not by hand. Generating SDKs from it too is optional.

How to do it

Publish the docs with a renderer, such as Redoc or Scalar. Generate clients with a tool such as OpenAPI Generator. Serve the raw OpenAPI file too, so agents can read it.

How to check

The published docs show the same version number as the OpenAPI file in the latest release. Where you ship an SDK, the build regenerates it and fails when the committed copy differs.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/api-design/contracts-and-docs/generated-docs">Agent Wranglers API design playbook</a>. In code you write, add a comment next to it with the same link.