The first example is intentionally ordinary: a register of instruments with a generated identifier, a unique serial number, and a name. It is small enough that every declaration has a visible purpose. Open 01-foundation.yaml before adding the review workflow.
Read the document from the outside inward
The top-level adl value selects the language version. The domain’s version identifies the model you publish. These values answer different questions. Using language 0.6 does not require your application to have version 0.6; the example’s application version is 1.0.0.
The domain name identifies the application model. Inside resources, Instrument is the resource name. Its collection is instruments, the public collection spelling used by its generated routes. Keeping these explicit avoids guessing whether the engine pluralizes an unfamiliar resource name as you intended.
The following is a fragment from the complete document:
object:
id: { type: uuid, primaryKey: true }
serialNumber: { type: string, required: true, unique: true, maxLength: 80 }
name: { type: string, required: true, maxLength: 160 }
The serial number is the workshop’s business identifier; the UUID is the record identity used by the API. They may have different lifetimes. A business label can be corrected while the record identity remains stable, unless your requirements explicitly say otherwise.
Establish which tool you are running
From the repository root, inspect the CLI before following a command copied from a manuscript:
build/bin/Release/adl.exe --help
build/bin/Release/adl.exe --json validate \
docs/books/adl-0.6/handbook/examples/01-foundation.yaml --strict
The .exe suffix is used by this repository’s Linux builds too. The suffix does not identify the executable format. More importantly, a recent source checkout does not update an old binary automatically. During preparation of this edition, the existing binaries lacked the Journey command even though its source was present. The relevant targets were rebuilt before recording the new example checks.
Validation accepts a document under the validator’s implemented rules. It does not start an HTTP server, create users, prove a permission invariant, or demonstrate a successful deployment. Lint supplies additional authoring advice. For this deliberately small register, a warning that a resource has no relationships is useful context rather than evidence of a broken model.
Use a second reading of the document
The repository also has adl-ref, an independently implemented reference tool. The book’s verification script records its results alongside the C++ CLI. Agreement between the two reduces the chance of unnoticed parser drift. It does not remove mistakes shared by the specification or examples.
bash tools/adl/adl-ref/adl-ref.sh check \
docs/books/adl-0.6/handbook/examples/01-foundation.yaml
Always read the actual result. A wrapper’s help text can lag the implementation’s accepted versions. Conversely, an old binary can silently ignore a construct that a newer source tree understands. Version-gate tests in Chapter 17 help distinguish acceptance from meaningful recognition.
Separate authoring from installation
A domain file needs a host, a store, authentication, and any required extensions before it can serve the intended application. The handbook’s runtime script creates its own temporary configuration and database. It loads the domain and test identities into a loopback-only server and removes the running process when finished. Its files remain under work/books/ for inspection.
Use that script to reproduce the book. For your own application, start from the deployment instructions appropriate to your site rather than copying the laboratory’s test credentials and trust configuration. The lab’s role is to make a small behavior observable; a site’s role is to operate the application over time.
The source of the CLI entry points is cli/src/main.cpp. The document envelope and parser stages are described in ADL 4.
Workshop
In a working copy, remove primaryKey, misspell a type, and change the language version separately. Record which tool rejects each change and its diagnostic. Restore the document after each experiment so the next result has one clear cause.