ADL 34 · Part IV — Generated interfaces

0.5.1 baseline + 0.6 edition note

Pass-thru mode

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 pass-thru dispatch, caller identity, and response forwarding. 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 34-pass-thru-mode.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.

34.1 Purpose and scope

A field’s ui metadata lets a document and its client share presentation configuration. ADL owns its placement and preservation; the client owns the meaning of keys such as widget, rows, or hidden. There is no domain mode: pass-thru switch to enable this feature.

The inherited chapter (v0.5.0, retired) says a field accepts arbitrary JSON in ui and returns it through schema introspection. At revision 3a1655dc, native model construction preserves only an object-valued ui at a fully built field. Resolved-source introspection can still expose values or placements that the model ignored. This distinction is the central compatibility boundary of the checked implementation.

ADL 10 owns field declarations, ADL 8 and ADL 13 own reuse, and ADL 47 discusses client UI extensions. Pass-thru metadata is not a UI engine, a second validation language, or a permission override.

34.2 Declaration and value shape

Place ui beside type and other field keys:

adl: "0.5.1"
domain:
  name: catalog
  version: "1.0.0"
  resources:
    Entry:
      object:
        title:
          type: string
          required: true
          ui:
            widget: markdown
            rows: 10
            odd key:
              values: [1, true, null, x]

The example keys belong to an illustrative client vocabulary. Their spelling, allowed values, nesting, and rendering behavior are not defined by ADL. Objects can contain arrays, scalars, nulls, and names with spaces without semantic validation of those contents. The empty object is a retained payload; no ui means no metadata.

The inherited contract also admits an outer array, scalar, or null. The current parser’s is_object() guard silently leaves these out of Field.ui_passthru. The examples distinguish this model loss from source preservation rather than calling native admission a successful arbitrary-JSON round trip.

ui at domain or resource level is outside the baseline placement rule. The parser’s unknown-key diagnostics and strictness behavior are recorded in the fixtures. An ignored key surviving inside resolved source does not make that placement an interpreted ADL declaration.

34.3 Preservation across different interfaces

There are several different round trips. State which one a client needs:

SurfaceWhat the checked implementation uses
Parser DomainModelField.ui_passthru, stored as serialized JSON text for object-valued field metadata
ADL model exportParses that payload and emits field ui when retained
Registry reload with sourceReconstructs the model from retained source
Registry reload without sourceDepends on the serialized model/export representation
Domain /schemaPrimarily a resolved-source view, enriched with model metadata
Per-domain OpenAPIField/API projection without the opaque ui payload
Generated record CRUDRecord values; no frontend interpretation of ui

The ordinary schema endpoint is:

GET /api/v1/domains/{name}/schema

It returns an envelope whose data.domain.resources.Entry.object.title.ui contains the example payload. Field metadata is not a property of every stored Entry record. The native examples call the schema action after submission and inspect its actual payload.

The schema handler uses resolved source when available. Consequently an outer array/scalar/null, an unsupported-level key, or nested metadata can appear there even when absent from the model and export. A client reading /schema and a tool reading DomainModel can observe different coverage. The source-free fallback is lossy in ways that retained source can conceal. The object and empty-object fixtures retain their metadata through native export and source-free reload. The reused-property fixture instead fails source-free reload because required provenance members are missing from stored source.

“Unchanged” means the same JSON value at a supported surface, not preservation of YAML comments, anchors, whitespace, quoting style, mapping byte order, or source locations. Model export can reformat a payload. Those textual details are source-representation concerns, not pass-thru semantics.

34.4 Reuse and nested fields

A reusable property expanded into a full resource field goes through normal field construction and can carry object-valued ui. The checked reuse.yaml fixture follows the payload from domain.properties.Caption through $ref expansion to schema introspection and model export.

Nested component/repeater members follow a reduced field-construction path. The current builder copies type and required state without recursively building all metadata, so nested ui does not reach the same native model representation. It can remain in resolved source and thus in /schema. This is the same construction boundary affecting nested constraints in ADL 30.

Composition can alter which declaration supplies a field’s metadata. Apply the precedence and conflict rules of ADL 13; this chapter adds no special deep-merge rule for arbitrary frontend keys. The single-property example proves that particular reuse path, not every trait/directive/nested combination.

34.5 Runtime and client responsibility

A key named required inside ui is not ADL’s field-level required. A key named permissions inside it does not grant access. The checked example puts both in the opaque object and still observes a required-field rejection and role denial from the real declarations. Passing metadata through a model is not executing it.

Client authors should agree a vocabulary and version for their metadata, decide how to handle unknown keys, and render labels or rich content according to the client’s own requirements. That is informative design guidance. ADL does not standardize widget names, promise rendering, load remote modules, or certify a frontend’s use of these values.

Because clients can receive resolved source rather than only supported model members, presence in the introspection payload should not be used as proof of server-side enforcement. Read actual validation and permission declarations from their owning structures and observe operation results where necessary.

34.6 Diagnostics and verification

There is no pass-thru-specific runtime action or error family. Unsupported placement participates in ordinary parser diagnostics. Contents of a retained object are opaque and receive no widget-schema validation. Other field, permission, and domain errors keep their ordinary ADL 31 envelopes.

The examples cover a nonempty object, empty object, array, scalar, null, domain/resource placement, nested component metadata, and reused property. They compare native parse/export, registry restoration, schema/OpenAPI actions, and independent modeller diagnostics. The modeller’s admission of arbitrary JSON is recorded separately from native preservation.

The evidence record identifies exact inputs, commands, source hashes, and assertions. No browser, UI renderer, localization round trip, or external widget provider was run. These boundaries keep the supported metadata contract distinct from the informative directions in ADL 47.