Skip to content

Update both OpenAPI specs from ld main - #172

Merged
tbantle22 merged 3 commits into
devfrom
taylor/update-openapi-specs
Aug 20, 2026
Merged

Update both OpenAPI specs from ld main#172
tbantle22 merged 3 commits into
devfrom
taylor/update-openapi-specs

Conversation

@tbantle22

Copy link
Copy Markdown
Collaborator

Re-vendors specs/hosted-v1.yaml and specs/dolthub-v2.yaml from ld main (781c0ea3435) and regenerates. Both had drifted.

Hosted v1 — 3 endpoints, 4 schemas

GET   /deployments/{owner}/{deployment}/config     getDeploymentConfig
GET   /deployments/{owner}/{deployment}/backups    listDeploymentBackups
POST  /deployments/{owner}/{deployment}/disable    disableDeployment

Plus Backup, ConfigSetting, DeploymentConfig, DisableAccepted. All carry the existing Deployment tag, so the nav is unchanged.

The v1 overview is hand-written, so it doesn't pick these up automatically — I added all three to its endpoint table and extended Long-running work, since disable returns 202 with the deployment in stopping and is polled exactly like a create. It also carries the spec's warning that disabling tears down instances and their storage.

DoltHub v2 — prose only, but it caught a bug

No structural change: same 22 operations, 40 schemas. The spec diff hoists RequestId into a shared header component and redeclares error responses as application/problem+json. The only generated change is Problem.type becoming required.

That content-type change broke the generated docs. Error bodies were looked up under application/json only, so every error row silently lost its Problem schema link — caught in the regenerated diff:

-| `401` | Authentication credentials were missing or invalid. | [`Problem`](…#model-problem) |
+| `401` | Authentication credentials were missing or invalid. |  |

Media-type lookups now go through a jsonBody() helper accepting either type. The v2 endpoint pages net to zero diff in this PR, which confirms the links were restored exactly.

The same bug means the hosted error rows have been blank since those docs landed — that spec already used problem+json. So this fix repairs v2 and improves hosted at the same time; the Problem links appearing in hosted/api/v1/*.md are new.

Verification

Endpoint table matches all 9 hosted operations exactly, every referenced model anchor resolves on both trees, 312 internal links check clean, frontmatter passes, 202 pages build, 90/90 Cypress.

tbantle22 and others added 3 commits August 19, 2026 16:21
Re-vendors specs/hosted-v1.yaml and specs/dolthub-v2.yaml from ld main
(781c0ea3435).

Hosted v1 gains three Deployment endpoints and four schemas:

  GET  /deployments/{owner}/{deployment}/config    getDeploymentConfig
  GET  /deployments/{owner}/{deployment}/backups   listDeploymentBackups
  POST /deployments/{owner}/{deployment}/disable   disableDeployment

plus Backup, ConfigSetting, DeploymentConfig, and DisableAccepted. The
hand-written v1 overview picks all three up in its endpoint table, and the
long-running-work section now covers disable — it returns 202 with the
deployment in `stopping` and is polled the same way a create is — along with
the warning that disabling tears down instances and storage.

DoltHub v2 has no structural change: same 22 operations and 40 schemas. Its
diff is the RequestId header being hoisted into a shared component and error
responses being declared as application/problem+json.

That content-type change exposed a generator bug. Error bodies were looked up
under application/json only, so every error row lost its Problem schema link
the moment the declaration became application/problem+json. The hosted spec
already used problem+json, which means those rows have been blank since the
hosted docs landed. Media-type lookups now go through a jsonBody() helper that
accepts either, so both APIs link Problem again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Re-vendors specs/hosted-v1.yaml from ld main (3654e2df4bd), which adds two
Deployment endpoints and two schemas:

  POST   /deployments/{owner}/{deployment}/instances       addDeploymentInstance
  DELETE /deployments/{owner}/{deployment}/instances/{id}  deleteDeploymentInstance

plus AddInstanceRequest and InstanceDeleteAccepted. Hosted v1 is now 11
operations and 23 schemas. dolthub-v2.yaml is unchanged at this ld commit.

Both endpoints are added to the hand-written overview's endpoint table, and
Long-running work gains a paragraph for them. They return 202 like create and
disable, but unlike those there is no per-instance state field to poll, so
progress is observed through the instance list instead: an added replica is
ready when it reports a host, and a removed one is gone when it drops off the
list, which only reports instances that aren't stopped.

This is the first DELETE in either generated API doc; its badge and its
body-less curl example both render correctly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The Parameters table disappeared from the instance endpoints. The generator
read only operation.parameters, but the spec now declares owner/deployment (and
id) on the path item, which OpenAPI 3.1 §4.8.9 says every operation under that
path inherits. Hoisting them there is the natural thing to do once a path has
more than one method, which is what adding POST /instances did — so the same
commit that introduced the new endpoints silently stripped the parameters off
the existing GET.

endpointBlock now merges the path item's parameters with the operation's, with
operation-level entries overriding an inherited one of the same name and
location, per the spec. The merged set also feeds the curl example, so a
required query parameter declared on a path item still lands in the URL.

Restores 2 parameters on listDeploymentInstances and documents 2 on
addDeploymentInstance and 3 on deleteDeploymentInstance. Audited against the
spec: all 11 hosted operations now render a Parameters table exactly when the
spec defines parameters for them. DoltHub v2 declares none at the path-item
level, so its output is byte-identical.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tbantle22
tbantle22 merged commit 2b0233a into dev Aug 20, 2026
7 checks passed
@tbantle22
tbantle22 deleted the taylor/update-openapi-specs branch August 20, 2026 18:45
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