ADL 28 · Part IV — Generated interfaces

0.5.1 baseline + 0.6 edition note

API configuration

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 API overrides and exposed operation consistency. 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 28-api-configuration.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.

28.1 Scope and the edition correction

Resource API configuration changes generated paths and declares custom operations. ADL 26 owns route naming and site selection; ADL 21 owns access control. A route setting must not be read as an authorization rule for every way of calling an action.

This chapter replaces the relevant examples from the inherited API configuration chapter (v0.3.1, retired) using the signed A3 ratification: api.path and api.collection are rejected syntax from 0.5.1-a. The current parser still admits them, even in the checked strict mode. That is a recorded implementation defect, not permission to use the removed spellings in new 0.5.1 documents.

Observed behavior below is pinned to 31e59154, with native parse/model, registered routes, generated actions, and independent modeller results in the evidence.

28.2 Supported settings and removed names

Place collection directly on the resource and API settings under its api block:

Entry:
  collection: journal-entries
  api:
    disable: [create, update, delete]
  object:
    title: { type: string, required: true }
  permissions:
    read: ['*']
    create: [admin]
    update: [admin]
    delete: [admin]

The complete exposure example includes the versioned domain and an explicit primary key. This declaration suppresses selected CRUD routes while retaining admin permissions on the underlying generated write actions.

SettingCurrent native interpretation
Resource collectionEffective collection segment; see ADL 26
api.disableArray of list, get, create, update, delete, put, count, distinct, bulk
api.disable_list, disable_get, disable_create, disable_update, disable_delete, disable_put, disable_count, disable_distinct, disable_bulkIndividual boolean settings
api.versionExtra path segment between domain prefix and collection
api.operationsStandard-operation method/path overrides
api.customNamed mapping of custom operation definitions
api.custom_operationsAlternate array form, with different parsed capabilities

The parser and API model are the source references for this table. The settings are not arbitrary extensions: unknown API keys receive native warnings and have no demonstrated behavior. The strict controls for under, directAccess, and typo each admit the document with one unknown-key warning. They do not configure nested routes or direct access.

The rejection-intent fixtures removed-path and removed-collection currently parse with no warning and produce the legacy collection segment. The independent modeller also reports no errors for them. Neither result satisfies the signed removal requirement. These files are negative contract examples accompanied by explicit current-implementation expectations.

When several naming spellings are supplied, the current parser gives top-level collection precedence, then the obsolete api.path, then obsolete api.collection. This precedence is source inspection of the defect path; author only the supported top-level form.

28.3 Exposure controls and their limits

disable: [list] removes the collection GET route. The other accepted names remove the item GET, collection POST, both item PUT and PATCH, or item DELETE respectively. The five individual boolean keys are processed after the array. Consequently disable: [list] followed by disable_list: false enables list again in the checked control.

These switches affect the route registrar. The action generator still registers the corresponding resource actions. In the exposure example, admin create, update, and delete succeed through kernel dispatch despite the missing write routes. In the all-disabled example, generated create, list, count, and bulk-create calls succeed.

Count, distinct, and bulk routes remain registered when only the five CRUD switches are set; they are suppressed by their own switches, described below. Feature routes such as restore/import/export and custom-operation routes are not removed by any of these switches. An abstract resource is different: it has no generated resource routes or actions, as checked in ADL 26.

Four further values were added in ADL plugin 0.9.2 (2026-09-13): put, count, distinct and bulk, each also available as a boolean disable_<name> key. The parser accepts them (adl_parser.cpp, the api.disable loop), and the route registrar honours them (route_registrar.cpp), as does schema population. Volume 3’s reserved names lists all four boolean keys.

Correction. Through 2026-09-22 this section stated that the strict parser rejects api.disable: [bulk] and [count] as “documented but unimplemented”. That ceased to be true nine days after the chapter’s source snapshot and is now the opposite of what the parser does.

The strict parser still rejects [restore] and [updat] as unknown values. These are native parser errors with an explanatory message; they are not silently effective controls. The chapter tests the strict path, not every permissive parsing entry point.

For a read-only authorization policy, define write permissions accordingly. A missing HTTP route alone does not establish read-only behavior across the kernel, compatibility actions, and other transports.

28.4 Standard-operation overrides and version segments

An override changes the method and suffix for an existing operation:

api:
  version: v7
  operations:
    update:
      method: POST
      path: /:id/replace
    patch:
      method: POST
      path: /:id/edit

For the checked catalog.Entry example, the registrar produces POST /api/v1/catalog/v7/entries/:id/replace for the PUT action and POST /api/v1/catalog/v7/entries/:id/edit for the PATCH action. The override key update controls the PUT route, while patch controls PATCH, even though the PATCH action’s suffix is .update. Preserve that route/action distinction when configuring these keys.

The other recognized override names are list, get, create, and delete. The parser uppercases explicit methods. Paths are resource-relative suffixes; the runtime appends them to the collection base. The examples specify both method and path so their meaning does not depend on empty-value defaults. An override does not run a different validator or supply application code.

api.version adds a path segment; it does not modify the frozen /api/v1 protocol prefix, the domain’s declared semantic version, or its bus major. Domain-level API prefixes and aliases are separate declarations owned by ADL 5 and ADL 26.

The schema-management action reports collectionPath using the domain prefix and collection segment. The checked versioned example reports /api/v1/catalog/entries, omitting /v7, while the registered routes contain /v7. Inspect the route catalog when this setting is used; current schema introspection is not an exact route oracle.

28.5 Custom operations

28.5.1 Mapping form and permissions

The mapping form names a custom operation and may supply literal field changes:

api:
  custom:
    publish:
      permissions: [editor]
      fields:
        status: published

The current defaults are method POST and suffix /:id/{operationName}. The complete custom example also includes an operation with omitted permissions and an explicitly public operation. Omitted or empty custom permissions are seeded to [admin].

The custom-operation handler recognizes *, authenticated, and matching caller roles, including additional roles[]. The checked publish operation returns 401 authentication_required for an anonymous caller, 403 FORBIDDEN for a viewer, and 200 for a caller whose additional roles include editor. The defaulted operation denies a viewer and allows admin; the explicit * operation allows anonymous execution.

This is the custom handler’s role gate. It is not the full record-aware permission machinery used by ordinary CRUD. Do not infer owner-expression, conditional-state, or target-field permission semantics from a role-list example. Use ADL 21 for those separate contracts.

28.5.2 Field changes and execution limits

The generic handler loads an item by id, evaluates the operation’s declared field values, updates those fields directly, refetches the item, and publishes its operation event. The checked publish operation writes published even when the request supplies status: client.

The value resolver recognizes NOW()/now(), $this.fieldName, boolean/null spellings, complete numeric literals, and otherwise a string literal. This is not general AEL. Write status: published; embedding AEL-style quote characters would make them part of the stored string. ADL 18 owns the actual expression language.

Only declared operation field updates are applied by the generic SQL path. Request fields are not a general PATCH body for that handler. The array-form control supplies a client status but has no parsed operation fields; it returns the unchanged status.

The generic custom operation does not dispatch ordinary PATCH. Source inspection therefore does not establish its ordinary field validation, lifecycle hooks, state-machine checks, audit/version history, or cache invalidation. Some recognized names, such as duplicate/clone/copy and the apply-discount variants, select specialized handlers with their own behavior. This chapter checks the generic operation and its permissions; it does not claim execution coverage for those specialized application conventions.

28.5.3 Alternate authoring forms

api.custom_operations accepts an array with a name, method, path, and permission entries. In the checked parser it does not consume fields. The example’s declared field update disappears from the model and the live operation leaves the record unchanged. Prefer the mapping form for the field changes described above.

There is also a resource-level operations mapping, separate from api.operations. Source inspection shows that it declares custom operations and takes its role strings from guards; it is not a set of standard-route overrides. Its incomplete equivalence to the API mapping/array forms should not be hidden behind a single “alias” description.

28.6 Collisions, export, and evidence

The collision example gives a custom operation GET /:id, overlapping the ordinary item GET. Submission succeeds and the route catalog retains two registrations for that method/path. The evidence does not run an HTTP matcher to select a winner. Avoid such overlaps; collection-segment collision rejection in ADL 26 is not a general route-conflict validator.

The recorded model export and registry projections preserve the checked API version and operation overrides. Custom operations retain their parsed permissions and fields, though snapshot projection can reorder mapping entries. The array form’s missing fields are already absent before serialization. Preserve the authored source for review, and consult each chapter’s recorded restoration limits rather than assuming every feature survives an export.

The verification record includes 23 native cases, 77 explicit assertions, nine independent modeller projections, and the shared focused-test results. It covers admission, disabled route/action differences, custom role gates and field behavior, schema-path disagreement, and duplicate registration. It does not claim HTTP transport conformance or repair the parser’s acceptance of removed keys.