Skip to main content

Function: getProducersOfSchema()

getProducersOfSchema(directory): (path) => Promise<Service[]>

Defined in: messages.ts:164

Returns the producers of a given schema path.

Parameters

ParameterType
directorystring

Returns

Function

Parameters

ParameterType
pathstring

Returns

Promise<Service[]>

Example

import utils from '@eventcatalog/utils';

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

// Returns the producers of a given schema path
const producers = await getProducersOfSchema('events/InventoryAdjusted/schema.json');