Skip to content
Last updated

asyncapi

Products:RedocRedocRealmRealm
Plans:ProEnterpriseEnterprise+

Customize the behavior and appearance of AsyncAPI documentation. Requires an AsyncAPI description file.

Options

OptionTypeDescription
downloadUrls[API description URL object]List the URLs used to download the AsyncAPI description in JSON or YAML format.

excludeFromSearch

boolean

Excludes an AsyncAPI description file from search results and llms.txt when set to true. Default: false.

You can apply it to a specific file, or to all AsyncAPI descriptions.

feedbackFeedback objectHide or customize the type of or text included in the feedback form that displays at the end of each page.
jsonSamplesDepthnumberSets the default depth for rendering JSON samples in protocol binding panels. Default: 3.
layoutstringSpecifies layout options for AsyncAPI documentation. Possible values: three-panel | stacked. Default: three-panel.

Examples

Configure multiple APIs

In your config file, the asyncapi options can be defined in the root-level or per-API:

  • root-level options apply to all API descriptions
  • API-level options apply only to individual descriptions

If both are present, the options are merged, but the per-API options take precedence.

The following example shows separate configurations for multiple APIs:

redocly.yaml
logo: images/awesome-logo.svg
asyncapi:
  layout: stacked
apis:
  events@default:
    root: 'asyncapi/events.yaml'
    asyncapi:
      downloadUrls:
        - title: Download AsyncAPI description
          url: 'https://github.com/Redocly/museum-events-example/blob/main/events.yaml'
      jsonSamplesDepth: 4
  events@v2:
    root: 'asyncapi/events-v2.yaml'
    asyncapi:
      layout: three-panel
rules:
  example-rule-name: error

To exclude a specific API from the search results, locate the API in redocly.yaml and under the asyncapi key, set the excludeFromSearch option to true.

redocly.yaml
apis:
  events@default:
    root: 'asyncapi/events.yaml'
    asyncapi:
      excludeFromSearch: true

To exclude all APIs from the search results, under the asyncapi key, set the excludeFromSearch option to true.

redocly.yaml
asyncapi:
  excludeFromSearch: true

Resources

  • AsyncAPI Specification - Official AsyncAPI Specification documentation for understanding event-driven API description standards and best practices
  • Add AsyncAPI descriptions - Step-by-step guide to adding AsyncAPI documentation to your Redocly project
  • Supported AsyncAPI extensions - Complete list of all AsyncAPI extensions supported by Redocly for enhanced API documentation
  • Configuration options - Explore other project configuration options for comprehensive documentation and platform customization