We maintain a copy of the OpenAPI spec for the production API in the docs package - packages/docs/open-api.json. The following page describes how to update this file.

This schema is used to generate the API reference docs.

Updating packages/docs/open-api.json

Run the following command to copy the OpenAPI / Swagger spec to the docs package:

curl "https://app.dittofeed.com/documentation/json" | jq "." > packages/docs/open-api.json

Note this command assumes you have jq installed, which formats the JSON output from the API server.

Adding New Endpoints to the Docs

Run the following command to add new endpoints to the docs:

npx @mintlify/scraping@latest openapi-file packages/docs/open-api.json --outDir packages/docs/api-reference/auto

Then add the new endpoints to the mint.json file.

mint.json
{
  "group": "API Reference",
  "pages": [
    "api-reference/auto/content/get-apiadmincontenttemplates",
    ...
  ]
}

Running the Docs Locally

cd into docs directory

cd packages/docs

Run the mintlify dev server.

mintlify dev