Skip to content

3. The document

Contents of DESL 0.1

3.1 Top-level object

A DESL document is validated by desl.schema.json#/$defs/Specification:

Property Type Req. Description
$schema URI – The schema's $id with #/$defs/Specification.
desl "0.1" ✓ The DESL version (2.7).
language Language ✓ The designer type's identity (3.2).
functions map SimpleId → Function – Reusable CEL functions (3.3).
metamodel Metamodel ✓ What a document holds (section 4).
persistence Persistence ✓ How documents are stored (section 5).
constraints Constraints – What makes a document valid (section 6).
surface Surface ✓ How the model is laid out (section 7).
operations map SimpleId → Operation – What each gesture changes (section 8).
doc Doc – Documentation of the designer type as a whole.
x-* any – Extensions (2.6).

3.2 Language

Property Type Req. Description
id qualified identifier ✓ Globally unique id of the designer type; reverse-DNS style is RECOMMENDED.
version SemVer string ✓ The designer type's version (2.7).
origin string <vendor>/<type> ✓ The designer type's origin, matching ^[a-z0-9-]+/[a-z0-9-]+$ ("etalii/knowledge"). It is the first line of every registration of the type's documents (FBL section 8.1), the designer every DED definition of the type names, and the type's key in a host's catalogue. Successive versions of one designer type keep the same origin.
label LocalizedText – Display name ("Knowledge").
doc Doc – Shown in the runtime's help.
defaultLocale BCP 47 tag – Default "en".
locales string[] – Locales every LocalizedText SHOULD translate into.
authors {name, email, url}[] – The tool engineers who maintain it.
license SPDX expression – The specification's licence.
homepage URI – Project page.
icon string – The designer type's icon, by name.
limits {celCost, maxElements} – The cost limit of one expression (2.5), and a soft limit on the elements of a document beyond which a runtime SHOULD warn.

3.3 Functions

functions declares reusable CEL functions, called by name in any expression. A Function ($defs/Function) has positional params, each {name, type, doc} with a CEL type or a metamodel type, a returns type, and its body cel. The body sees its parameters only, and document when uses lists it. A function MAY call functions declared before it; a function that calls itself, directly or through others, is a specification error.

Referenced from