Skip to main content

Open Modeling Language (OML) Reference

Introduction

This reference provides the technical specification for Open Modeling Language (OML) configurations and profiles. OML defines the modeling vocabulary for projects: element types, relationship types, layers, properties, and validations. Configurations are versioned artifacts (typically YAML files in Git) that projects reference by id and version.

For an overview of OML concepts, see Open Modeling Language (OML).

For examples of profiles and how to use them, see Profiles.

Modeling configuration structure

A modeling configuration is the top-level artifact. It defines:

SectionDescription
idUnique semantic identifier (e.g. c4-model, enterprise-architecture)
versionSemantic version
name, description, maintainer, licenseMetadata
systemDefinitionsOptional reference to system-defined definitions (structure elements, base types, link types, organizational roles, system element/relationship types)
linkTypesList of link type definitions (e.g. documentation, repository, issue-tracker). Centrally defined.
layersList of layer definitions (e.g. business, application, data, technology, knowledge). At least one required. Customers can customize.
organizationalRolesList of organizational role definitions (e.g. watcher, owner, participant). Centrally defined.
profilesList of modeling profiles that supply element types, relationship types, properties, validations

Layer (per entry):

FieldDescription
idUnique identifier for the layer
nameDisplay name
descriptionShort description
descriptionDetailedDetailed description (optional)

Organizational role (per entry):

FieldDescription
idUnique identifier for the role
nameDisplay name
descriptionShort description
descriptionDetailedDetailed description (optional)
multipleBoolean; whether multiple assignees are allowed

Link type (per entry):

FieldDescription
idUnique identifier for the link type
nameDisplay name
descriptionShort description
descriptionDetailedDetailed description (optional)

Modeling profile structure

A modeling profile is identified by id and version and contains:

SectionDescription
idUnique semantic identifier of the profile (e.g. c4, ddd). Must be unique within a modeling configuration. Pattern: lowercase alphanumeric and hyphens with optional dot-separated segments (e.g. c4-system).
versionSemantic version of the profile (e.g. 1.0.0, 2.1.3).
nameHuman-facing name of the profile (e.g. "C4 Model", "Domain-Driven Design").
descriptionShort description of what this profile provides.
iconOptional icon identifier from the Carbon Design System icon catalog (e.g. Application, Document, Network). Used to represent the profile in the UI. See Carbon icons.
propertyGroupsSemantic groups of related properties used together. Element types, relationship types, and diagram types reference property groups by ID in their propertiesSchema instead of defining properties inline. Each group has id, name, description, optional descriptionDetailed, and properties (list of field definitions).
textTemplatesOptional list of reusable markdown templates for formatted text. Each template has id, name, description, optional descriptionDetailed, and content (markdown). Referenced by formattedText properties (via textTemplates on the field) and by element types' descriptionTextTemplate to initialize content when creating new instances. Templates are static markdown without variables.
statusEnumerationsOptional list of status enumerations for element lifecycle. Only element types in this profile can reference them; each element type references exactly one. Each enumeration has id, name, description, optional descriptionDetailed, default (key used when no status is set), and values (ordered list). Each value has key, name, description, optional descriptionDetailed, category (proposed | active | deactive), and order.
elementTypesList of element type definitions (node/concept types) in this profile. Defines the vocabulary of model elements and diagrams available when this profile is active.
relationshipTypesList of relationship type definitions (connection types) in this profile. Defines how elements can be connected and with what semantics.
ℹ️note

The id of the element-type als determines the folder structure for persistence in a git repository. Each . is interpreted as a /. So the segments represent the resulting folder sructure.

💡tip

It is highly recommended to start every id with a profile acroynm, like e.g. c4 or ddd. This helps during definition of the profiles and also fosters uniqueness of ids.

caution

Element type and relationship type IDs must not start with system. to avoid conflicts with the default system configuration.

Element type

Each element type extends the named modeling language item base and adds element-specific, style, and optional canvas fields.

Named item (base type, shared with relationship types):

FieldDescription
idTechnical identifier (e.g. c4.container, ddd.aggregate). Must be unique across all element types in a modeling configuration.
nameHuman-facing name (e.g. "Container", "Aggregate Root").
descriptionShort description for architects and modelers.
descriptionDetailedFormal, explanatory description for AI systems (what it represents, how it's used, what it must not be confused with).
tagsOptional free-form categories or profile labels.

Element-specific:

FieldDescription
baseTypeOptional. Behavior of the element. default-model-element (default): persistent model elements, referenceable across diagrams. diagram: element is a diagram (diagramContent). composite-part: lives inside parent, not independently accessible.
layerOptional. Reference to a layer ID from the modeling configuration.
statusEnumerationOptional. ID of a status enumeration from the same profile; defines lifecycle states for instances.
trackableOptional boolean (default false). When true, instances get system tracking fields: creationTs, creator, creatorId, lastModifiedTs, lastModifier, lastModifierId.
propertiesSchemaCustom data fields: references to property group IDs (same profile) or inline field definitions.
organizationalRolesOptional. List of organizational role IDs this element type supports (must be defined in the modeling configuration).
descriptionTextTemplateOptional. Array of text template IDs from the profile used to initialize the description when creating new instances.
managementModeOptional (default user). Who can create and manage instances: user, system, or system-user.

Style:

FieldDescription
style.iconIcon identifier or URL. Ignored when shape is set.
style.accentColorRequired accent color (hex, rgb, or named color).
style.baseColorOptional base/background color (hex, rgb, or named color).
style.defaultCanvasStyleOptional canvas style: card, container, shape, note, image, freehand, or none.
style.shapeOptional SVG vector or reference. When set, icon is ignored.

Canvas (optional; for element types that can contain other elements):

FieldDescription
canvasConfig.allowedElementTypesArray of element type IDs allowed on this canvas, or "*" for all. Default filter and suggestion for what can be placed.
canvasConfig.descriptionHuman-readable description of what can be placed on this canvas and why.
canvasConfig.descriptionDetailedFormal description for AI systems: allowed types and how the canvas should be used.

Relationship type (summary)

Each relationship type extends the named modeling language item base and adds constraints, semantics, cardinality, behavior, style, and properties.

Named item (base type, shared with element types):

FieldDescription
idTechnical identifier (e.g. c4.uses, ddd.aggregate-contains). Must be unique across all relationship types in a modeling configuration.
nameHuman-facing name. Must be lowercase (e.g. "uses", "references").
descriptionShort description; for asymmetric types this is the forward direction.
descriptionDetailedFormal description for AI systems explaining the relationship semantics.

Constraints:

FieldDescription
typeMappingsArray of rules defining allowed source-to-target combinations. Each rule has sourceElementTypes and targetElementTypes (arrays of element type IDs). Supports wildcards (e.g. c4.*) At least one rule is required.

Semantics:

FieldDescription
bidirectionalBoolean (default false). When true, relationship is symmetric and the same name is used both ways; reverse must not be set. When false, can be one-directional or asymmetric; use reverse for asymmetric.
reverseOptional. For asymmetric bidirectional only (bidirectional must be false). Defines reverse direction: name (must be lowercase), description, optional descriptionDetailed. Reverse source/target are inferred from the forward type.

Behavior:

FieldDescription
prefillLabelWhen true, new relationship instances get the relationship type name as the label; when false, label is left empty for the user.

Style:

FieldDescription
style.styleLine style: line (solid), doubled_line, dotted, or dashed.
style.startArrowArrow at source end: arrow, arrow_filled, diamond, diamond_filled, reverse_triangle, circle_filled, or none.
style.endArrowArrow at target end: same options as startArrow.
style.defaultColorDefault line color (hex, rgb, or named color).
style.thicknessLine thickness in pixels (number).

Properties:

FieldDescription
propertiesSchemaCustom data fields: references to property group IDs from the same profile. Relationship instances can carry instance data for those groups.

Property groups and property types

Property groups are defined at the modeling profile level. Element types, relationship types, and diagram types reference property groups by ID in their propertiesSchema; they do not define individual properties inline. Groups bundle related properties (e.g. risk level and impact) for reuse across types.

Property group (per entry):

FieldDescription
idUnique identifier for the group within the profile (e.g. technology-stack, risk-metrics). Pattern: lowercase alphanumeric and hyphens.
nameHuman-facing name (e.g. "Technology Stack", "Risk Metrics").
descriptionOptional. Short description of the purpose and usage of this group.
descriptionDetailedOptional. Formal description for AI systems: what the group represents and how its properties relate.
propertiesList of property (field) definitions belonging to this group. At least one required.

Property (field) definition — common fields:

FieldDescription
fieldNameUnique identifier for this field within the properties schema (e.g. riskLevel, technologies). Pattern: lowercase alphanumeric and hyphens.
displayNameHuman-facing name (e.g. "Risk Level", "Technologies").
descriptionOptional. Short description of the purpose and usage of this field.
descriptionDetailedOptional. Formal description for AI systems.
typeData type; see supported property types below.
arrayOptional boolean (default false). When true, the field holds multiple values. For elementReference, use array: true to allow multiple element references.
isDraggableOptional boolean (default false). When true, values can be reordered by dragging in the UI (e.g. for ordered lists).
requiredOptional boolean (default false). Whether the field is required. Applicable to selection, multipleSelection, elementReference, and elementReferenceSelection.
deprecatedOptional boolean (default false). Whether the field is deprecated and only shown for compatibility reasons.
defaultValueOptional. Default value; must match the field type (e.g. string for text/selection, array of strings for multipleSelection or for elementReference when array is true).
Reserved property names

The following names are reserved and must not be used for custom property fieldNames: uuid, label, type, description, summary, icon, creationTs, creator, creatorId, lastModifiedTs, lastModifier, lastModifierId, profileId, profileVersion, serializationVersion, tags, identifier.

Property (field) definition — type-specific fields:

FieldApplies toDescription
optionsselection, multipleSelection, elementReferenceSelectionRequired for selection types. List of choices. Each option has key (semantic id), name (display name), optional description.
allowedElementTypeselementReference, elementReferenceSelectionFor elementReference: required. Array of element type IDs that can be referenced.
textTemplatesformattedTextRequired. Array of text template IDs from the profile used as initial content. At least one.
colorCoderatingOptional. Color (e.g. hex) used to display the rating in the UI.
textAttachmentFormatattachment-textOptional. Format of the text attachment: text, markdown, yaml, json, or xml.
allowedAttachmentFileExtensionsattachment-text, attachment-image, attachment-binaryOptional. Allowed file extensions when uploading (e.g. ["pdf", "doc", "docx"]). Extensions without leading dot.
Reserved property names

The following names are reserved and must not be used for property fieldName for relationships: uuid, label, type, description, summary, icon, creationTs, creator, creatorId, lastModifiedTs, lastModifier, lastModifierId, profileId, profileVersion, serializationVersion, tags, identifier, destinationIdentifier, sourceIdentifier, longDescription.

Supported property types:

TypeDescription
booleanTrue/false values.
textSingle-line short text.
largeTextMulti-line text.
formattedTextMarkdown-formatted text; use textTemplates for initial content.
selectionSingle choice from a predefined list (static options).
multipleSelectionMultiple choices from a predefined list (static options).
elementReferenceReference to one or more model elements. Requires allowedElementTypes. Use array: true to allow multiple element references.
elementReferenceSelectionSingle value that can be either a choice from options or a reference to an element type from allowedElementTypes.
numberNumeric value (integer or decimal).
dateDate (ISO 8601).
timestampDate and time (ISO 8601).
ratingQualitative rating (e.g. 1–5).
attachment-textText-based file attachment.
attachment-imageImage file attachment.
attachment-binaryBinary file attachment.