Skip to manual
gluon

GOL language

Package

A Package names your ontology, carries its version and dependencies, and sets which lint rules count as errors.

Model author or developer

Where it goes

Contoso keeps contoso/enterprise in gluon.yaml. The loader reads every YAML file under the package root, so folders are a convention you can change. Name it in lowercase kebab-case, optionally scoped, such as contoso/core.

Fields

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

FieldPresenceShape
versionRequiredsemver
golRequiredrange
defaultLocaleOptionalstring
localesOptionalarray
licenseOptionalstring
defaultDomainOptionalkebab
dependenciesOptionalobject
defaultsOptionalobject
conventionsOptionalobject

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.

3.1 Package

GOL · YAML
apiVersion: gluon/v1
kind: Package
metadata: { name: contoso/enterprise, title: Contoso Enterprise Ontology }
spec:
  version: 2.4.0 # SemVer; the validator computes the minimum legal bump (section 12)
  gol: ">=1.0 <2.0" # language version range
  defaultLocale: en
  locales: [en, nl]
  license: proprietary
  defaultDomain: enterprise # optional: lets dependants omit the domain (`alias::Name`)
  dependencies: # keyed by alias; the alias is what refs use before `::`
    core: { package: contoso/core, version: "^2.3" }
    std: { package: gluon/std, version: "^1.0" } # standard value types: Email, Iban, Money, CountryCode, ...
  defaults:
    classification: internal # applied where a type states none
    markings: []
    crossSegmentLinks: stub # hide | stub, see 10.4
    unknownProperties: reject
  conventions: # lint configuration, severity per rule
    GLN-W301: error # "object type has no description" promoted to error here

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 contoso/enterprise Package in the designer's YAML pane, with its validation status.
Contoso's contoso/enterprise Package in the designer's YAML pane, with its validation status.