Basedoc

OpenAPI specs that stay in sync

Generate standards-compliant OpenAPI specs from your Basedoc API docs. One source of truth, automatic versioning.

Write your API docs in Basedoc. We build the spec at deploy time and host on your docs site at /openapi.yaml.

Create OpenAPI specs from your docs

Basedoc is the only platform that auto-generates OpenAPI spec files from your docs and serves them from your site.

One source of truth

Basedoc flips the script and uses your docs as the source of truth. Your API reference pages and the OpenAPI spec are generated from the same definitions.

Auto-generated OpenAPI specs

Every build that includes API docs pages produces /openapi.yaml and /openapi.json at the root of your deployed site. No separate spec file to maintain.

Smart version bumps

Basedoc watches API changes and cleverly bumps the your spec version as a patch, minor, or major based on whether you added endpoints, removed them, or only changed descriptions and examples.

openapi.yaml (generated)
openapi: 3.0.0
info:
  title: My API
  version: 1.2.0
paths:
  /v1/users:
    post:
      summary: Create a user
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUser'
      responses:
        '201':
          description: Created
components:
  schemas:
    CreateUser:
      type: object
      properties:
        email: { type: string }
        name: { type: string }
      required: [email, name]
...

Learn the API docs DSL

Coming soon

Import OpenAPI files

Bring your existing OpenAPI spec and Basedoc will generate API reference pages from it.

Get automated OpenAPI specs from your API docs

Contact support

Send us a quick message with your issue or question