Skip to content

Drop a spec on a project or Docs in the app, or use Replace file on an API doc. A spec split across files goes up as a .zip: Dockito finds the root, follows its $refs to the other files and publishes one bundled document.

Terminal window
dockito publish openapi.yaml --to team/apis

The CLI reads the file and every file its relative $refs name, bundles them on your machine and publishes one document. Publishing the same file again changes nothing. The reply says the version, the checks and what changed:

v3 (2.3.0 → 2.4.0): 1 breaking, 0 likely, 0 not.
ERR GET /projects: param "session" (cookie): now required

dockito check runs on your machine; the file never leaves it. With --against, it downloads the published doc and compares:

Terminal window
dockito check openapi.yaml --against bookings-api --format markdown
Exit codeMeans
0Clean
1Check errors (or a $ref that points nowhere)
2The file differs from the published doc
3Breaking changes against the published doc

The highest wins. --json prints the same as JSON; --format markdown prints a table for a pull request comment.

A GitHub Actions workflow that comments on each pull request, and publishes on merge:

.github/workflows/openapi.yml
on:
pull_request:
push:
branches: [main]
jobs:
api:
runs-on: ubuntu-latest
env: { DOCKITO_TOKEN: "${{ secrets.DOCKITO_TOKEN }}" }
steps:
- uses: actions/checkout@v4
- run: npm install -g dockito
- if: github.event_name == 'pull_request'
run: dockito check openapi.yaml --against ${{ vars.DOCKITO_API_DOC }} --format markdown > check.md || true
- if: github.event_name == 'pull_request'
run: gh pr comment ${{ github.event.number }} --body-file check.md
env: { GH_TOKEN: "${{ github.token }}" }
- if: github.event_name == 'push'
run: dockito publish openapi.yaml --to ${{ vars.DOCKITO_API_FOLDER }} -m "${{ github.sha }}"

To fail the pull request on a breaking change, drop || true (exit code 3 fails the step). A token with Publish on the workspace goes in DOCKITO_TOKEN.