Skip to manual
gluon

GOL language

Extension

An Extension adds properties, enum values or links to a type that another package or domain owns.

Model author or developer

Where it goes

Contoso keeps SupplierProcurementTerms in domains/procurement/extensions.yaml. The loader reads every YAML file under the package root, so folders are a convention you can change. Name it in PascalCase. The name must be unique within its domain across all type kinds.

Limits

An Extension can add members. Removing or retyping one is GLN-E261.

Fields

The keys under spec. Nested shapes follow ExtensionSpec in the GOL JSON Schema.

FieldPresenceShape
targetRequiredref
addPropertiesOptionalpropertyMap
addEnumValuesOptionalobject
addLinksOptionalarray

Syntax and rules

The examples are fragments. Put them in a package next to the resources they reference. A ... stands for a CEL expression you write yourself.

9.6 Extension

A package, or a domain, extends a type it does not own (the P9 @extend idea), without forking it.

GOL · YAML
kind: Extension
metadata: { name: ContractDutchLaw }
spec:
  target: core::legal.Contract
  addProperties: { kvkNumber: { type: "std::KvkNumber" } }
  addEnumValues: {}
  addLinks: []

Extensions can add, never remove or retype (GLN-E261).

Check your package

Shell
gluon validate examples/contoso
gluon test examples/contoso

validate reports each problem with a GLN code and its place in the file. test runs the package's Test resources. See the language guide and the diagnostics.

Contoso's SupplierProcurementTerms Extension in the designer's YAML pane, with its validation status.
Contoso's SupplierProcurementTerms Extension in the designer's YAML pane, with its validation status.