Skip to main content
New project sponsor 🪝Hookdeck: Serverless infrastructure for event-driven architecture. Learn more.

versionDomain

Callable

  • versionDomain(directory: string): (id: string) => Promise<void>

  • Version a domain by it's id.

    Takes the latest domain and moves it to a versioned directory. All files with this domain are also versioned. (e.g /domains/Payment/openapi.yml)

    @example
    import utils from '@eventcatalog/utils';

    const { versionDomain } = utils('/path/to/eventcatalog');

    // moves the latest Payment domain to a versioned directory
    // the version within that domain is used as the version number.
    await versionDomain('Payment');