Skip to manual
gluon

GOL language

SharedProperty

A SharedProperty is declared once and reused, so a renewal date means the same on every type.

Model author or developer

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.

FieldPresenceShape
typeOptionaltypeExpr
useOptionalref
requiredOptionalboolean
defaultOptionalschema union
immutableOptionalboolean
uniqueOptionalboolean
constraintsOptionalconstraints
indexedOptionalboolean
searchableOptionalboolean
sortableOptionalboolean
filterableOptionalboolean
facetOptionalboolean
derivedOptionalderived
sensitivityOptionalsensitivity
semanticsOptionalenum: identifier, userId, thumbnailUrl, latitude, longitude, altitude, eventStart, eventEnd, measure, currencyAmount, parentKey
historyOptionalboolean
bitemporalOptionalboolean
asOfOptionalstring
titleOptionallocalized
descriptionOptionallocalized
unitOptionalstring
formatOptionalstring
renderHintOptionalenum: badge, link, image, longText, code, progress
conditionalFormatOptionalarray
visibilityOptionalenum: prominent, normal, hidden
lineageOptionalenum: required, optional
aiOptionalai
synonymsOptionalarray
statusOptionalstatus
sinceOptionalsemver
deprecatedOptionaldeprecated
provenanceOptionalprovenance

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.

GOL · YAML
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

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 renewalDate SharedProperty in the designer's YAML pane, with its validation status.
Contoso's renewalDate SharedProperty in the designer's YAML pane, with its validation status.