Skip to main content

This is an AI tool. The text you enter is sent to our AI service to generate your result. Our own server doesn't store it or use it for training; if it's down, a backup AI provider may handle it. AI can make mistakes — check important results before you use them. How we handle your input

Error responses deserve the most attention

The error responses section is the highest-value part of any API doc and the one most often skipped. Client code branches on error shapes: retry on 429, refresh the token on 401, show a field-level message on 422. If your documented error doesn't match what the API actually returns, you generate support tickets. Check every error shape against a real response, not against what you think the code does.

Include the errors people actually hit, not just the happy path. Rate limiting, expired tokens, validation failures with field details, idempotency conflicts. This is what a developer debugging at midnight needs. A docs page that only shows 200 responses is a brochure, not documentation. The errors are the documentation.

How to Use API Documentation Writer

  1. 1Pick the API style: REST, GraphQL or gRPC.
  2. 2Choose an output format: Markdown Docs, OpenAPI 3.0 YAML, or a Postman Collection.
  3. 3Describe the API: its endpoints, what they take, what they return, and how authentication works.
  4. 4Click 'Write API Documentation'.
  5. 5For OpenAPI output, validate the YAML in a spec validator or import it into Swagger UI before publishing: generated specs are frequently almost-valid.
  6. 6Run the generated OpenAPI through a validator before publishing. Near-valid specs with a bad $ref are common in generated output, and a validator finds them in seconds.

Frequently Asked Questions

Is the OpenAPI output valid?

Usually close, and not reliably valid. Generated specs commonly have small schema errors: a misplaced required array, a `$ref` to something that does not exist. Run it through a validator or import it into Swagger UI, which will point at the line.

What does the Postman Collection output give me?

A collection structure with the requests, plus a list of environment variables to set and a short usage guide. You will need to fill in your real base URLs and auth values. It uses example.com placeholders deliberately rather than guessing your hosts.

Can it document an existing API from its code?

Not from code: describe the endpoints instead. If you want documentation generated from the implementation, a framework-native tool that reads your routes and types will be more accurate than any description you write from memory.

Does it document error responses?

Yes, including standard auth failures. Check them against what your API actually returns: the documented error shape is the contract clients code against, and getting it wrong causes more support load than an undocumented endpoint.

Which format should I choose?

OpenAPI if anything downstream consumes a spec: client generators, mock servers, API gateways. Markdown if humans are the only audience. Postman if the main use is letting someone try the API by hand.

Should I generate OpenAPI or Markdown?

Follow what consumes it. If anything downstream reads the spec (SDK generators, mock servers, gateway configuration) generate OpenAPI, because then the spec gets machine-checked every time someone builds against it. If the only reader is a person, Markdown is faster to write and easier to skim.

The spec says example.com everywhere. Is that a bug?

No, it's deliberate: the tool won't invent your production URLs. Replace every placeholder before publishing. A spec pointing at example.com that someone actually tries to call fails in the most confusing way possible, and you'll get the support ticket.

How do I keep the docs in sync with the API?

You don't, automatically: generated docs are a snapshot. What works: regenerate the reference sections on every release, and keep hand-written guides (tutorials, concepts) in separate files so they don't get overwritten. Docs that have drifted from the API are worse than no docs, because people trust them.

About API Documentation Writer

The API Documentation Writer produces documentation for a REST, GraphQL or gRPC API in one of three formats: human-readable Markdown, an OpenAPI 3.0 spec, or a Postman collection with its environment variables and a usage guide.

The format choice should follow what consumes it. An OpenAPI spec is worth generating when something downstream reads it (client SDK generators, mock servers, gateway configuration) because then the spec is machine-checked by its consumers. Markdown is right when the only reader is a person.

Error responses are the section worth the most attention. The documented error shape is what client code branches on, and a documented error that does not match what your API actually returns generates more support tickets than an endpoint with no documentation at all. Check them against real responses.

Validate generated OpenAPI before publishing it: near-valid specs with a bad `$ref` or a misplaced `required` are common in generated output, and a validator finds them in seconds. Base URLs come out as example.com placeholders rather than guesses, so replace them.

You May Also Like