Where it goes
Contoso keeps renewalDate in domains/core/types.yaml. The loader reads every YAML file under the package root, so folders are a convention you can change. Name it in camelCase, like the properties that use it. The name must be unique within its domain.
Fields
The keys under spec. Nested shapes follow propertyObject in the GOL JSON Schema.
| Field | Presence | Shape |
|---|---|---|
type | Optional | typeExpr |
use | Optional | ref |
required | Optional | boolean |
default | Optional | schema union |
immutable | Optional | boolean |
unique | Optional | boolean |
constraints | Optional | constraints |
indexed | Optional | boolean |
searchable | Optional | boolean |
sortable | Optional | boolean |
filterable | Optional | boolean |
facet | Optional | boolean |
derived | Optional | derived |
sensitivity | Optional | sensitivity |
semantics | Optional | enum: identifier, userId, thumbnailUrl, latitude, longitude, altitude, eventStart, eventEnd, measure, currencyAmount, parentKey |
history | Optional | boolean |
bitemporal | Optional | boolean |
asOf | Optional | string |
title | Optional | localized |
description | Optional | localized |
unit | Optional | string |
format | Optional | string |
renderHint | Optional | enum: badge, link, image, longText, code, progress |
conditionalFormat | Optional | array |
visibility | Optional | enum: prominent, normal, hidden |
lineage | Optional | enum: required, optional |
ai | Optional | ai |
synonyms | Optional | array |
status | Optional | status |
since | Optional | semver |
deprecated | Optional | deprecated |
provenance | Optional | provenance |
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.
4.5 SharedProperty
A property definition declared once and used by many types and interfaces, so that "renewal date" means one thing platform wide.
kind: SharedProperty
metadata: { name: renewalDate, domain: core }
spec:
{
type: date,
title: Renewal date,
description: Date on which the agreement renews or lapses.,
searchable: true,
}
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.
