Skip to main content

Function: addUbiquitousLanguageToDomain()

addUbiquitousLanguageToDomain(directory): (id, ubiquitousLanguageDictionary, version?) => Promise<void>

Defined in: domains.ts:245

Adds a ubiquitous language dictionary to a domain.

Optionally specify a version to add a ubiquitous language dictionary to a specific version of the domain.

Parameters

ParameterType
directorystring

Returns

Function

Parameters

ParameterType
idstring
ubiquitousLanguageDictionaryUbiquitousLanguageDictionary
version?string

Returns

Promise<void>

Example

import utils from '@eventcatalog/utils';

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

// Adds a ubiquitous language dictionary to the latest Payment domain
await addUbiquitousLanguageToDomain('Payment', { dictionary: [{ id: 'Order', name: 'Order', summary: 'All things to do with the payment systems', description: 'This is a description', icon: 'KeyIcon' }] });

// Adds a ubiquitous language dictionary to a specific version of the domain
await addUbiquitousLanguageToDomain('Payment', { dictionary: [{ id: 'Order', name: 'Order', summary: 'All things to do with the payment systems', description: 'This is a description', icon: 'KeyIcon' }] }, '0.0.1');