---
title: "10 — API Documentation Tools: OpenAPI, Postman, Stoplight, ReadMe"
uid: api-documentation-tools
tags: ["documentation", "postman", "openapi", "roadmap:api-design", "readme", "swagger", "stoplight"]
excerpt: "Good API docs are a projection of a machine-readable contract, not a hand-maintained artifact. The tools — Swagger/OpenAPI, Postman, Stoplight, ReadMe — differ in whether they author, test, mock, or present that contract."
date: 2026-08-13T03:28:33+0000
source: https://www.aveshina.my.id/en/blog/api-documentation-tools
---

I used to write API documentation by hand at the end of a project, and it was stale before it shipped. The frame that fixed the whole workflow: **good API documentation is generated from a single machine-readable contract (the OpenAPI spec), and the tools differ in which part of the lifecycle they help with — authoring the spec, testing against it, mocking it, or rendering it into docs humans can read.** [1] The documentation isn't a separate artifact maintained by hand; it's a projection of the contract, and the contract is the source of truth.

The reason this framing matters is that it tells you what each tool is *for*. Swagger renders. Postman tests. Stoplight designs. ReadMe hosts. They're not competitors so much as tools that operate on the same OpenAPI file from different angles. Picking tools is really picking which lifecycle stages you want help with.

```figure
<svg viewBox="0 0 720 260" xmlns="http://www.w3.org/2000/svg" class="my-6 w-full max-w-2xl" role="img" aria-label="An OpenAPI spec file at the center, with four arrows radiating to labeled tools around it: Stoplight (design/author), Postman (test & mock), Swagger UI (render docs), ReadMe (host interactive docs). Each tool is color-coded.">
  <g font-family="ui-sans-serif, system-ui, sans-serif" text-rendering="geometricPrecision">
    <defs>
      <marker id="dt" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
        <path d="M0,0 L10,5 L0,10 z" fill="#64748b"/>
      </marker>
    </defs>

    <!-- OpenAPI core -->
    <rect x="280" y="100" width="160" height="60" rx="10" fill="#0f172a" stroke="#475569" stroke-width="1.5"/>
    <text x="360" y="124" font-size="13" font-weight="700" fill="#e2e8f0" text-anchor="middle">OpenAPI spec</text>
    <text x="360" y="142" font-size="10" fill="#94a3b8" text-anchor="middle">the single contract</text>

    <!-- tools -->
    <rect x="60" y="40" width="140" height="50" rx="8" fill="#fef9c3" stroke="#ca8a04" stroke-width="1.3"/>
    <text x="130" y="62" font-size="12" font-weight="700" fill="#422006" text-anchor="middle">Stoplight</text>
    <text x="130" y="78" font-size="10" fill="#422006" text-anchor="middle">design / author</text>

    <rect x="520" y="40" width="140" height="50" rx="8" fill="#e0e7ff" stroke="#6366f1" stroke-width="1.3"/>
    <text x="590" y="62" font-size="12" font-weight="700" fill="#1e1b4b" text-anchor="middle">Swagger UI</text>
    <text x="590" y="78" font-size="10" fill="#1e1b4b" text-anchor="middle">render reference docs</text>

    <rect x="60" y="170" width="140" height="50" rx="8" fill="#dcfce7" stroke="#16a34a" stroke-width="1.3"/>
    <text x="130" y="192" font-size="12" font-weight="700" fill="#052e16" text-anchor="middle">Postman</text>
    <text x="130" y="208" font-size="10" fill="#052e16" text-anchor="middle">test / mock / explore</text>

    <rect x="520" y="170" width="140" height="50" rx="8" fill="#fce7f3" stroke="#db2777" stroke-width="1.3"/>
    <text x="590" y="192" font-size="12" font-weight="700" fill="#500724" text-anchor="middle">ReadMe</text>
    <text x="590" y="208" font-size="10" fill="#500724" text-anchor="middle">host interactive docs</text>

    <!-- arrows from core to tools -->
    <g stroke="#64748b" stroke-width="1.3" fill="none">
      <path d="M280,115 C220,90 180,80 200,75" marker-end="url(#dt)"/>
      <path d="M440,115 C500,90 540,80 520,75" marker-end="url(#dt)"/>
      <path d="M280,145 C220,170 180,180 200,185" marker-end="url(#dt)"/>
      <path d="M440,145 C500,170 540,180 520,185" marker-end="url(#dt)"/>
    </g>
  </g>
</svg>
```

## The contract: OpenAPI (née Swagger)

The foundation of the whole stack is the **OpenAPI Specification** — a standardized, machine-readable format for describing an API's endpoints, parameters, request/response shapes, auth, and status codes [2]. It started life as Swagger; the spec was donated to the Linux Foundation's OpenAPI Initiative and renamed, so "Swagger" and "OpenAPI" refer to the same lineage — Swagger is now the tooling brand, OpenAPI is the spec [2][3].

The reason OpenAPI is the foundation is that a single spec file can drive every downstream activity. The same openapi.yaml can be rendered into reference docs (Swagger UI), used to generate client SDKs, mocked for testing, validated against in contract tests, and imported into Postman collections. The contract becomes the single source of truth; the documentation stops being a hand-maintained website that drifts from the code.

```
# a single OpenAPI fragment drives docs, mocks, clients, and tests
paths:
  /orders/{id}:
    get:
      parameters:
        - name: id
          in: path
          required: true
          schema: { type: string }
      responses:
        '200':
          description: an order
        '404':
          description: not found
```

The discipline this enables is **design-first**: write the spec *before* the implementation, share it with consumers, mock against it, and only then build the server. The spec is the contract; the code is one implementation of it.

## Swagger UI: rendering the reference

**Swagger UI** is the most visible face of OpenAPI — the interactive reference page that renders a spec into a browsable list of endpoints, each with a "Try it out" button [3]. It's the zero-effort way to turn an OpenAPI file into usable documentation, and it's what most teams ship as their first API docs. Its strength is that it's free, generated, and never out of sync with the spec (because it *is* the spec, rendered). Its limitation is that it's a reference, not a tutorial — it tells you what each endpoint does, not how to string them together to accomplish a task.

## Postman: testing, mocking, exploring

**Postman** started as a graphical HTTP client and grew into a full API platform [4]. For documentation-adjacent work, its roles are: exploring an API interactively (build requests, inspect responses), maintaining **collections** of saved requests that double as executable examples, **mocking** an API from a spec so consumers can develop against it before it exists, and running automated tests against endpoints.

The thing I use Postman for most is the collection-as-documentation pattern: a shared, versioned set of real requests that a new consumer can run with one click. It's more hands-on than a reference page — the consumer sees actual request bodies, headers, and responses — which makes it a good complement to Swagger-style reference docs. Postman's weakness is that collections can drift from the spec if maintained separately; importing from OpenAPI keeps them aligned.

## Stoplight: designing the spec visually

**Stoplight** sits at the *authoring* end [5]. Writing OpenAPI YAML by hand is verbose and error-prone; Stoplight provides a visual editor for designing APIs — you describe endpoints, schemas, and responses in forms, and it generates valid OpenAPI underneath. It also bakes in linting (style enforcement), mocking, and documentation hosting, all driven from the same spec.

The pitch is the design-first workflow made practical: a team can design, review, and iterate on an API's contract in a tool that validates as you go, before any server code is written. For organizations serious about API consistency across many teams, a design tool like Stoplight (or equivalent) is what makes "we follow these API standards" actually enforceable rather than aspirational.

## ReadMe: hosted, interactive docs

**ReadMe** is the polished end of the spectrum — a hosted documentation platform that turns an OpenAPI spec into a beautiful, interactive developer portal [6]. Beyond reference rendering, it adds log-in-to-try-it functionality (every example runs with the reader's own API key), guides and tutorials alongside the reference, and versioned docs.

The differentiator from Swagger UI is the *experience*: ReadMe is built for the API consumer's onboarding journey, not just their lookup journey. The tradeoff is that it's a product you pay for and host with. For a public API whose success depends on developer adoption, that investment pays off; for an internal API, Swagger UI plus a README is usually enough.

## Choosing among them

The selection logic I use:

- **Every** API with more than one consumer should have an OpenAPI spec. Non-negotiable; the spec is the contract.
- **Swagger UI** for zero-cost reference docs rendered from the spec. Default starting point.
- **Postman** for exploration, mocking, and executable example collections. Useful from day one.
- **Stoplight** (or a similar design tool) when the team is large enough that visual authoring and linting pay for themselves, or when API standards need enforcing.
- **ReadMe** (or equivalent) for public APIs where developer onboarding is a business concern.

The anti-pattern to avoid: hand-writing docs that drift from the code, or maintaining a Postman collection separate from an OpenAPI spec. Either way the documentation lies, and a lying API doc is worse than none.

## How I use this

For any API I ship, I start with the OpenAPI spec and treat it as the source of truth — I write it before (or alongside) the implementation, render it with Swagger UI as the baseline reference, and use Postman collections imported from it for exploration and testing. When the API is public-facing and adoption matters, that's when I reach for a hosted docs product like ReadMe. The unifying rule: documentation is generated from the contract, never handwritten alongside it. The contract is the thing I maintain; the docs are a view.

## References

[1] Swagger, "API Documentation Tools," 2024. [Online]. Available: [https://swagger.io/](https://swagger.io/)

[2] OpenAPI Initiative, "OpenAPI Specification," 2024. [Online]. Available: [https://www.openapis.org/](https://www.openapis.org/)

[3] HubSpot, "What is Swagger?," 2024. [Online]. Available: [https://blog.hubspot.com/website/what-is-swagger](https://blog.hubspot.com/website/what-is-swagger)

[4] Postman, "Postman API Platform," 2024. [Online]. Available: [https://www.postman.com/](https://www.postman.com/)

[5] Stoplight, "Stoplight — API Design Platform," 2024. [Online]. Available: [https://stoplight.io/](https://stoplight.io/)

[6] ReadMe, "ReadMe — Interactive API Documentation," 2024. [Online]. Available: [https://readme.com](https://readme.com)

```quiz
Q: What is the relationship between Swagger and OpenAPI?
- They are unrelated tools
- OpenAPI is the renamed, donated spec formerly called Swagger; Swagger is now the tooling brand
correct: 1
explain: The spec was donated to the OpenAPI Initiative and renamed. "Swagger" now refers to the tooling (like Swagger UI); "OpenAPI" is the specification.

Q: Why generate documentation from an OpenAPI spec rather than hand-writing it?
- The docs can never drift from the contract, because they ARE a rendering of it
- Hand-written docs load faster
correct: 0
explain: A single spec drives docs, mocks, clients, and tests. Docs generated from the spec are always in sync; hand-written docs inevitably drift.

Q: Which tool is most associated with visually authoring and linting an OpenAPI spec before any server code exists?
- Stoplight
- Swagger UI
correct: 0
explain: Stoplight is a design-first platform for authoring and validating specs visually. Swagger UI renders an existing spec; it isn't an authoring tool.

Q: A new consumer wants to actually fire requests against your API with their own API key and see real responses. Which tool best fits that interactive exploration?
- Postman (or an interactive hosted docs product like ReadMe)
- A static reference PDF
correct: 0
explain: Postman collections and ReadMe's interactive docs let consumers run real requests. Static references describe endpoints but don't execute them.

Q: "Design-first" API development means…
- write the OpenAPI spec, share and mock against it, then implement the server to match
- write the server first and document it later
correct: 0
explain: Design-first treats the spec as the contract authored before code. Consumers and server teams work against the same spec in parallel.
```
