Skip to main content

writeVersionedService

Callable

  • writeVersionedService(directory: string): (service: Service) => Promise<void>

  • Write a versioned service to EventCatalog.

    You can optionally overide the path of the Service.

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

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

    // Write a service
    // Service would be written to services/InventoryService/versioned/0.0.1
    await writeVersionedService({
    id: 'InventoryService',
    name: 'Inventory Service',
    version: '0.0.1',
    summary: 'Service that handles the inventory',
    markdown: '# Hello world',
    });