tool

OpenAPI

also called Swagger

A machine-readable specification format for HTTP APIs, from which documentation, clients, servers, mocks and validation can be generated.

contractsdocumentationcodegen

The value is that the contract stops being prose. A specification can generate typed clients so consumers do not hand-roll them, generate a mock server so a consumer can build before the provider is ready, drive request and response validation at the gateway, and be diffed between versions to detect breaking changes automatically in CI.

That last use is the one most teams miss and the one with the highest return: a pipeline step that fails the build when a change removes a field or narrows a type turns backward compatibility from a code-review responsibility into a mechanical guarantee.

Design-first (write the spec, review it, then implement) versus code-first (generate the spec from annotations) is a genuine choice. Design-first produces better contracts and enables parallel work; code-first is less effort and drifts less from the implementation.