Skip to content

API reference / @chanx-js/nestjs / asyncapiOf

Function: asyncapiOf() ​

ts
function asyncapiOf(module, options?): Promise<AsyncAPIDocument>;

Defined in: packages/nestjs/src/asyncapi.ts:12

The AsyncAPI document of a Nest app's gateways, without serving it: boots the module as an application context (no HTTP server), reads the document, and closes it. Providers still start, so a database module connects as it would at startup.

Parameters ​

ParameterType
moduleType<any> | DynamicModule
options?AsyncAPIOptions

Returns ​

Promise<AsyncAPIDocument>

MIT licensed