DevTools Pro · All tools · About

API Documentation Generator

About the API Documentation Generator

This API documentation generator turns an OpenAPI 3 or Swagger 2 spec, in JSON or YAML, into readable reference docs grouped by tag. Each endpoint lists its parameters, request body and responses, and the whole document can be exported as Markdown or a standalone HTML page.

OpenAPI vs Swagger

Swagger 2.0 was the original specification for describing REST APIs. In 2016 it was donated to the OpenAPI Initiative and renamed, and version 3.0 followed in 2017. "Swagger" now usually refers to the tooling around the format, such as Swagger UI and Swagger Editor.

The two versions are detected automatically from the top-level swagger: "2.0" or openapi: 3.x field. The main structural difference you will notice is where schemas live: definitions in Swagger 2 versus components/schemas in OpenAPI 3.

What ends up in the generated docs

The header shows the API title, version, description, server URLs and security schemes. Operations are grouped by tag (an operation with several tags appears under each one); untagged operations go under default. Each one shows its method, path, summary, operation ID, required auth and a deprecated marker when set.

Request and response schemas are flattened into field tables. Nested objects use dot notation (address.city), array items use [] (items[].id), and allOf parts are merged. Local $ref pointers like #/components/schemas/Pet are resolved; external file references are listed but not fetched.

Spec format limits

JSON is parsed with the browser's standard parser. YAML is read by a lightweight built-in parser that covers what specs normally use: nested mappings, lists, quoted strings, flow collections like [a, b] and block text with |. YAML anchors and aliases (&ref / *ref), custom tags and multi-document files are not supported; convert such specs to JSON first.

How to Use the API Documentation Generator

  1. Paste your spec into the Spec box, click Upload file to load a .json, .yaml or .yml file, or click Load sample to see an example.
  2. Check the rendered docs below. Click any endpoint to expand its parameters, request body and responses.
  3. Fix any problem reported in the orange error box, such as a YAML indentation error or an unresolvable $ref.
  4. Click Copy MD to copy the docs as Markdown, or Markdown / HTML to download a file.

Frequently Asked Questions

Is my API spec uploaded anywhere?
No. Parsing and rendering happen in your browser, and uploaded files are read locally. Internal or unreleased specs stay on your machine.
Does it support OpenAPI 3.1?
Yes, any spec with an openapi: 3.x version is accepted. Newer 3.1 schema features beyond common JSON Schema keywords are shown in simplified form.
Can it load a spec from a URL?
Not directly. Open the URL in your browser, then paste the JSON or YAML, or save it and use Upload file.
Why do I get "Unresolvable $ref"?
The pointer does not match anything in the spec, often because of a typo or a schema defined under definitions in an OpenAPI 3 file. Check the path after #/.
Does it include a "Try it out" console?
No. It generates static reference docs. Use Swagger UI or a client like Postman or Bruno when you need to send live requests.
Are oneOf and anyOf schemas shown?
Yes, as alternative types separated by | in the Type column. allOf schemas are merged into one field list.

Related tools