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
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
id | string |
ubiquitousLanguageDictionary | UbiquitousLanguageDictionary |
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');