Skip to main content

Function: getConsumersOfSchema()

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

Defined in: messages.ts:142

Returns the consumers of a given schema path.

Parameters

ParameterType
directorystring

Returns

Function

Parameters

ParameterType
pathstring

Returns

Promise<Service[]>

Example

import utils from '@eventcatalog/utils';

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

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