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.
| Field | Presence | Shape |
|---|---|---|
target | Required | ref |
addProperties | Optional | propertyMap |
addEnumValues | Optional | object |
addLinks | Optional | array |
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.
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
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.
