Add an AsyncAPI specification file

To begin to create pages for your websockets, make sure you have a valid AsyncAPI schema document in either JSON or YAML format that follows the AsyncAPI specification. Your schema must follow the AsyncAPI specification 3.0+.

To make sure your AsyncAPI schema is valid, you can paste it into the AsyncAPI Studio

Auto-populate websockets pages

You can add an asyncapi field to any tab or group in the navigation of your docs.json. This field can contain either the path to an AsyncAPI schema document in your docs repo, the URL of a hosted AsyncAPI schema document, or an array of links to AsyncAPI schema documents. Mintlify will automatically generate a page for each AsyncAPI websocket channel.

Examples with Tabs:

"navigation": {
  "tabs": [
    {
        "tab": "API Reference",
        "asyncapi": "/path/to/asyncapi.json"
    }
  ]
}

Examples with Groups:

"navigation": {
  "tabs": [
    {
      "tab": "AsyncAPI",
      "groups": [
        {
          "group": "Websockets",
          "asyncapi": {
            "source": "/path/to/asyncapi.json",
            "directory": "api-reference"
          }
        }
      ]
    }
  ]
}

The directory field is optional. If not specified, the files will be placed in the api-reference folder of the docs repo.

Channel Page

If you want more control over how you order your channels or if you want to just reference a single channel, you can create an MDX file with the asyncapi field in the frontmatter.

---
title: "Websocket Channel"
asyncapi: "/path/to/asyncapi.json channelName"
---