Skip to content

Pick up service windows from ld main, and render every authored response example - #210

Merged
tbantle22 merged 1 commit into
devfrom
taylor/hosted-api-v1-service-windows
Sep 15, 2026
Merged

tbantle22 merged 1 commit into
devfrom
taylor/hosted-api-v1-service-windows

Conversation

@tbantle22

Copy link
Copy Markdown
Collaborator

Re-vendors specs/hosted-v1.yaml from ld main (3c82f7d8b2d) and regenerates. dolthub-v2.yaml is unchanged there, so v2 is untouched.

What the spec added

Method Path Operation
GET /api/v1/deployments/{owner}/{deployment}/service-windows listDeploymentServiceWindows

plus ServiceWindow and DayOfWeek. Deployment goes 16 → 17 endpoints, models.md 37 → 39 schemas. Deployment-tagged, so no new page and no nav entry. In the overview it takes a table row and joins the endpoints that return their list whole rather than paging it.

A renderer fix this endpoint forced

This one isn't optional polish — the page was wrong without it.

listDeploymentServiceWindows authors two response examples: a configured window, and the nil-UUID default that a deployment reports until one is set. Only one rendered, and the one chosen was the default — because the picker prefers the example keyed default, and here that key names the default window, not the representative case. So the sole example on the page was the degenerate one:

{ "id": "00000000-0000-0000-0000-000000000000", "day_of_week": "sunday", "is_default": true }

A reader would reasonably take that for what the endpoint returns.

Responses with more than one authored example now render all of them under a single Example responses heading, each captioned with its summary, in spec order. default is only a key in this position and carries no "representative" meaning, so spec order decides — which puts the configured window first. A response with one example, or an unnamed one, renders byte-identically to before.

This is the response half of the gap flagged in #208, which covered the request half. I'd offered it there and held it back; the service windows spec turned it from a nicety into a correctness problem, so it's here.

Blast radius is two endpoints. Service windows, and getDeploymentLogs — whose second example is an empty page, the case its own "stop on an empty page, not a missing token" rule turns on, and which until now never appeared. v2 authors one example per response and is byte-identical.

Verification

  • npm run build:dolt succeeds; check-content-frontmatter passes
  • Generators idempotent over the committed tree
  • #listDeploymentServiceWindows, #model-servicewindow, #model-dayofweek resolve in the built HTML, and the overview link points at the first
  • Diffed both v2 pages to confirm the example change reaches nothing there

🤖 Generated with Claude Code

…nse example

Re-vendors specs/hosted-v1.yaml from ld main (3c82f7d8b2d). dolthub-v2.yaml is
unchanged there, so v2 is untouched.

  GET /deployments/{owner}/{deployment}/service-windows  listDeploymentServiceWindows

plus ServiceWindow and DayOfWeek. Deployment goes from 16 endpoints to 17 and
models.md from 37 schemas to 39. Deployment-tagged, so no new page or nav entry.
In the overview it takes a table row, and joins the endpoints that return their
list whole rather than paging it.

The renderer needed one fix to document it honestly. This endpoint authors two
response examples — a configured window, and the nil-UUID default a deployment
reports until one is set — and only one was rendered. Worse, the one chosen was
the default: the picker prefers the example keyed `default`, which here names the
default *window* rather than the representative case. The page's only example was
therefore the degenerate one, nil UUID and all.

Responses with more than one authored example now render all of them under a
single heading, each captioned with its summary, in spec order. `default` is
only a key in this position and does not mean "the representative one", so spec
order is what decides, which puts the configured window first. A response with
one example, or an unnamed one, renders exactly as before.

This is the response half of the gap noted in #208, which did the request half.
It reaches two endpoints: service windows, and log retrieval, where the second
example is an empty page — the case that endpoint's own stopping rule turns on.
v2 authors one example per response and is unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tbantle22
tbantle22 merged commit 5cfe964 into dev Sep 15, 2026
7 checks passed
@tbantle22
tbantle22 deleted the taylor/hosted-api-v1-service-windows branch September 15, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant