ADL 0.6.0 reference · Review draft 1 · November 14, 2026.
Contents · Source map · Evidence
The 0.6 edition note
This chapter retains the detailed language contract and its source-specific observations. Its chapter number and numbered sections remain stable. The 0.6 additions do not by themselves change this subject’s defaults or supply fresh execution evidence for it.
Reverification should cover generated route identity, site routing, and action registration. Use the original examples and evidence links below to recover the earlier test context. The new edition’s source map records this chapter as inherited detail; the current draft does not claim those historical tests were rerun.
Retained reference detail
The numbered sections below are carried from 26-route-generation.md. Their original baseline and evidence remain attached to the source. Statements about “current” or “checked” behavior in this retained text refer to those original observations unless the edition note explicitly updates them. This is a consolidated draft, not a claim of complete re-verification.
26.1 Scope and authority
ADL generates a resource interface from the resolved domain model. A resource’s name determines its default collection segment; its declaration and feature settings determine which operations receive routes. Site selection precedes matching those routes.
This chapter owns that URL contract. ADL 28 owns API settings; ADL 29 owns feature switches. ADL 3 owns action dispatch and identity. A registered route identifies an action, whose permissions still apply when it is called.
The edition follows the signed A3 ruling,
Draft 05 §§3.4–3.5 and §13,
and the collection-key ratification.
It revises the inherited route chapter (v0.3.1, retired).
Observed statements identify behavior checked at 31e59154; they do not
change signed language requirements.
26.2 Collection naming
26.2.1 Default transformation
Use singular resource names such as Person, Category, and UserProfile.
The current helper inserts an underscore before each uppercase character after
the first, lowercases the result, changes underscores to hyphens, and pluralizes
the final word. Earlier words remain unchanged.
| Resource | Collection segment |
|---|---|
Person | people |
SalesPerson | sales-people |
MissionAnalysis | mission-analyses |
Index | indexes |
Status | statuses |
Box | boxes |
Category | categories |
Toy | toys |
Settings | settings |
UserProfile | user-profiles |
The irregular dictionary is: person → people, child → children,
man → men, woman → women, datum → data, index → indexes,
foot → feet, tooth → teeth, mouse → mice, and goose → geese.
The unchanged words are settings, series, species, equipment,
information, metadata, data, news, media, sheep, and fish.
After those lookups, a final is becomes es; endings s, x, z, ch,
and sh take es; consonant-plus-y becomes ies; other words take s.
This is a defined naming algorithm, not a general English inflector.
The current case conversion treats each capital separately: APIKey becomes
a-p-i-keys. An already plural Posts becomes postses. Both are executed
controls, not suggested authoring styles. The
naming helpers
are the direct implementation reference.
26.2.2 Explicit collection names
Place a deliberate override directly on the resource:
Entry:
collection: journal-entries
object:
title: { type: string, required: true }
The complete naming fixture supplies the
surrounding domain and permissions. The segment must be nonempty and contain
only lowercase letters, digits, and hyphens. The checked parser also accepts
one leading slash and removes it; the example authoring form omits that slash.
Uppercase, underscores, embedded slashes, and an empty value produce an
INVALID_COLLECTION message.
The signed edition removes api.path and api.collection. Current native
admission of those spellings is a defect described in
ADL 28 §28.2.
Use top-level collection.
The parser rejects two resources with the same effective collection segment,
including collisions between a derived default and an explicit override. Its
check runs over the domain’s resources before route registration; declaring
an abstract resource or a resource API version is not a separate collection
namespace. The executable collision fixture uses Entry and Person with
Person.collection: entries.
26.3 Sites and the frozen REST prefix
The canonical external shape is:
/api/v1/{site}/{domain}/{collection}
Here /api/v1 is the REST protocol prefix. It is independent of the adl
language edition, domain version, and native plugin ABI. A domain version
2.3.0 does not turn that prefix into /api/v2.
The application is associated with a site. A listener can identify that site from its Host mapping, a recognized path segment, or both. The checked production site resolver implements the signed cases:
| Host mapping | Recognized path site | Result |
|---|---|---|
alpha | absent | alpha, Host-only alias |
| absent | alpha | alpha |
alpha | alpha | alpha |
alpha | beta | 409, site-routing conflict |
| absent | absent | 421, no site resolved |
A segment is a site only if it names a site configured on that listener. With no Host mapping, the checked unknown-site path returns 421. With a mapped Host, an unrecognized first segment may be the domain part of the Host-only alias. When the first segment equals both the Host’s site and a possible domain name, the resolver provides the unstripped path as a fallback. The REST integration retries that path when the stripped one has no route.
Site selection removes the site segment before ordinary route matching. Thus
an application’s route catalog contains /api/v1/catalog/entries, while its
canonical external address can be /api/v1/alpha/catalog/entries. These two
representations describe different stages of the same dispatch path.
The examples boot separate alpha and beta contexts, submit the same domain,
and observe independent stores and action identities. The pure resolver and
registered action dispatch are executed; a listening HTTP server, Host-header
parsing, authentication middleware, and network routing are not exercised here.
26.4 Core routes and action identities
Let C be the collection path after site selection, normally
/api/v1/{domain}/{collection}, and I its item path. For an ordinary key,
I = C/:id in the runtime route catalog; documentation commonly writes the
placeholder as {id}.
| Method | Registered path | Action suffix |
|---|---|---|
| GET | C | .list |
| GET | I | .get |
| POST | C | .create |
| PATCH | I | .update |
| PUT | I | .put |
| DELETE | I | .delete |
| GET | C/count | .count |
| GET | C/distinct | .distinct |
| POST | C/bulk | .bulk.create |
| PATCH | C/bulk | .bulk.update |
| DELETE | C/bulk | .bulk.delete |
Routes reference canonical action IDs. For site alpha, domain catalog
version 2.3.0, and resource Entry, the list action is
adl.alpha.catalog_v2.entry.list. The compatibility ID
adl.catalog.entry.list is also registered when bus.legacy_action_ids is
true. In the disabled-compatibility control, canonical create/list succeed and
the compatibility list returns 404 ACTION_NOT_FOUND.
A state-machine transition keeps its declared name in the route and is
snake-cased in the canonical action ID, like every other segment: a transition
declared closeTicket is POST …/:id/transitions/closeTicket and dispatches
adl.alpha.catalog_v2.entry.close_ticket. The engine maps the ID back to the
declared name, so closeTicket runs and its permissions.transitions.closeTicket
entry is the one enforced. Until 2026-09-24 a camelCase transition was refused
with 422 INVALID_TRANSITION over REST (kalos#1003).
Changing collection changes the URL segment without renaming the resource
part of its action ID. HTTP method/path overrides likewise do not define a new
action implementation.
For a composite key declared as primaryKey: [id, ownerId], the registered item
path is C/:id/:ownerId, preserving key order. The checked offline OpenAPI
projection still emits C/{id}. This disagreement means that projection cannot
be used alone to establish the current composite item route. The independent
modeller also raises unhashable type: 'list' for this resource-level array;
the evidence records that failure separately from native admission.
26.5 Feature and relationship routes
The route registrar adds these resource operations when the relevant declarations enable them:
| Declaration | Method and suffix relative to C |
|---|---|
softDelete | POST /:id/restore |
audit | GET /:id/audit, GET /audit |
versioning | GET /:id/versions, POST /:id/revert |
export | GET /export |
dataImport | POST /import |
| History events with endpoint enabled | GET /:id/history, GET /history |
State transition named approve | POST item path plus /transitions/approve |
| Dynamic sheet columns | GET/POST /columns, PATCH/DELETE /columns/:name |
History activation is specified in ADL 24; sheet mode
belongs to ADL 40. The history and sheet rows above are source
inspection, with history execution evidence in ADL 24. The other feature routes
and a transition route are checked by this chapter’s feature fixture. The
current restore/audit/history/version suffixes hard-code :id; do not infer
composite-key support for those endpoints from the core item-path control.
For a local belongsToMany relationship tags, the current routes are GET
I/tags for listing, POST I/tags for linking, and DELETE
I/tags/:{otherKey} for unlinking. There is no additional /link or /unlink
segment. A hasMany relationship produces GET I/{relationship}. Relationship
names undergo kebab conversion, and the generated join key supplies the unlink
placeholder. ADL 12 owns
relationship semantics and cross-domain reference boundaries.
Domain-level subsystems register their own routes. In particular, the current registrar also adds the domain media routes when this chapter’s minimal domain is submitted. A resource feature table is therefore not an inventory of every route in the application.
26.6 Absence, aliases, and collisions
An abstract resource contributes no resource routes or generated resource
actions. The BaseRecord control checks both absences. It may still appear as
a model/schema definition for derivation purposes.
A domain’s configured API aliases register another set of resource routes.
resource.api.version, when present, inserts a segment between the domain
prefix and the collection; it does not replace the frozen /api/v1 prefix.
These mechanisms and standard-operation overrides are detailed in
ADL 28.
Disabling an operation suppresses its corresponding CRUD route; it does not remove its generated action. Count, distinct, bulk, custom, and feature routes have their own registration paths. The all-disabled example in ADL 28 still executes create/list/count/bulk actions through the kernel. Permissions must express who is allowed to operate on the resource.
Collection collisions are checked during parsing. Arbitrary method/path collisions introduced by custom overrides are a different matter: the checked custom-operation control retains two GET registrations for the same item path. The core route catalog appends routes. This evidence establishes duplicate registration, not which handler wins a real HTTP match. Avoid overlapping declarations.
26.7 Verification and related chapters
The evidence record connects complete YAML, explicit expectations, native observations, and current source hashes. Its checks cover naming, registered paths, action IDs, abstract absence, composite keys, two isolated sites, and the site resolver. Offline OpenAPI and registry projections are recorded separately.
Continue with ADL 27 — Query parameters, ADL 28 — API configuration, and ADL 29 — Resource features. Diagnostic envelope details belong to ADL 31, and complete OpenAPI coverage to ADL 32.