Skip to content

15 entities declare wire: [json] with no OpenAPI component schema — an in-code backlog with no ticket #762

Closed

Description

@athvin

Gap against the closed shipped card #575 ("Typed API contract — OpenAPI to
TypeScript, drift-gated"). The contract and its drift gates are real; 15
entities cross the JSON wire with nothing in the document describing them.

The code says so itself —
rust/crates/er-server/src/openapi.rs:146-155, verbatim:

Entities that declare wire: [json] but carry no component schema.

This is a backlog, not a design. Wire::Json means the entity's payloads
cross the JSON wire, so every name here is reachable as JSON with nothing in
the document describing it. The list may shrink — register the ToSchema
above and delete the line — and must not grow.

The list

JSON_WIRE_WITHOUT_SCHEMA, openapi.rs:156-171:

candidate_key      column_profile     entity_link        ingest_batch
matching_model     metric_snapshot    metric_snapshot_source
pair_label         profile_finding    profile_run        record_quality
s3_ingest_cursor   tag                tagging            webhook_delivery

Why it costs something

Three consequences, none of which go red today:

  1. No generated TypeScript. openapi-typescript emits from
    frontend/src/lib/api/openapi.json, so a BFF handler or component touching
    any of these shapes is hand-typing it — and frontend.yml:158's
    git diff --exit-code -- src/lib/api/schema.d.ts cannot notice a type that
    was never generated. This is the same shape as the full-stack-tier bug class
    already recorded in this repo: the mock asserts the frontend's belief, not
    the server's behaviour.
  2. er-openapi-check cannot track them for breaking changes. It diffs
    component schemas (scripts/ci/api-breaking-gate.sh); an entity with no
    schema has nothing to diff, so a removed field or a retype on any of these 15
    is invisible to the gate. Note profile_run, profile_finding,
    column_profile and record_quality are the whole of the Data profiling and quality #580 profiling
    surface, and pair_label is on the review/labeling path.
  3. The gate forces a decision but does not force a good one — adding
    wire: [json] to a new entity fails the test until someone adds a line to
    this list, and adding the line is the cheap way out.

Do

Per entity, decide and act — this is a sequence of small independent changes,
not one big one:

  • Register the ToSchema in ApiDoc and delete its line (the documented
    shrink path), or
  • Drop wire: [json] from its entity.yaml if its payloads do not in fact
    cross the wire — which is the real question for s3_ingest_cursor,
    candidate_key and metric_snapshot_source, all of which look internal.

Registering one is a public-API decision (openapi.rs:153): it becomes a
documented schema er-openapi-check then tracks. So take them in order of
exposure — the profiling four and pair_label first, since those have screens
behind them.

Verify

cargo test -p er-server openapi and
cd frontend && corepack pnpm gen:api && git diff --exit-code -- src/lib/api/schema.d.ts.
Each registration regenerates openapi.json and schema.d.ts; both are
committed artifacts and both are drift-gated, so a partial regeneration fails.

Activity

  1. added
    mvp
    followup
    on Nov 7, 2026
  2. self-assigned this
    on Nov 8, 2026
  3. athvin commented on Nov 8, 2026

    @athvin
    OwnerAuthor

    Claimed — working in #900 (draft). Closing that PR releases the claim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

followupmvp

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions