Hexta AIHexta AI

createAsyncAPI()

The AsyncAPI server instance.

AsyncAPI Server

The main config for Hexta AI AsyncAPI.

It should not be referenced in browser environments.

input

The AsyncAPI schemas to read from.

  • File Paths
  • External URLs
  • Functions (see below)
import { createAsyncAPI } from '@hexta/asyncapi/server';

export const asyncapi = createAsyncAPI({
  input: ['./streetlights.yaml'],
});

disableCache

Disable caching of loaded schemas. Useful during development when schemas change frequently.

import { createAsyncAPI } from '@hexta/asyncapi/server';

export const asyncapi = createAsyncAPI({
  input: ['./asyncapi.yaml'],
  disableCache: true,
});

How is this guide?