Function: writeVersionedService()
writeVersionedService(
directory): (service) =>Promise<void>
Defined in: services.ts:184
Write a versioned service to EventCatalog.
You can optionally overide the path of the Service.
Parameters
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
service | Service |
Returns
Promise<void>
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',
});