Libraries
    Preparing search index...

    Options for the serveAsyncApi middleware.

    When server is provided, getSubscriptionRegistrations is derived from it automatically (unless explicitly overridden).

    interface ServeAsyncApiOptions {
        getSubscriptionRegistrations?: () => readonly SubscriptionRegistration[];
        info: AsyncApiInfo;
        path?: string;
        server?: AsyncApiServer_ServerLike;
        servers?: Record<string, AsyncApiServerEntry>;
    }
    Index

    Properties

    getSubscriptionRegistrations?: () => readonly SubscriptionRegistration[]

    Function that returns subscription registrations. Takes precedence over server.getSubscriptionRegistrations().

    AsyncAPI info metadata (title, version, description).

    path?: string

    Path to serve the spec at. Defaults to /asyncapi.json.

    A ServerBuilder (or any structurally compatible object). When set, subscription registrations are read from the server automatically. An explicit getSubscriptionRegistrations value takes precedence.

    servers?: Record<string, AsyncApiServerEntry>

    Server entries to include in the spec's servers map. Keys are server IDs (e.g. 'production', 'staging').