Pick up service windows from ld main, and render every authored response example - #210
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-vendors
specs/hosted-v1.yamlfrom ld main (3c82f7d8b2d) and regenerates.dolthub-v2.yamlis unchanged there, so v2 is untouched.What the spec added
/api/v1/deployments/{owner}/{deployment}/service-windowslistDeploymentServiceWindowsplus
ServiceWindowandDayOfWeek. 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.
listDeploymentServiceWindowsauthors 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 keyeddefault, 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.
defaultis 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:doltsucceeds;check-content-frontmatterpasses#listDeploymentServiceWindows,#model-servicewindow,#model-dayofweekresolve in the built HTML, and the overview link points at the first🤖 Generated with Claude Code