chore(openapi): regenerate committed spec — adds the missing v1 surface - #115
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d93799602a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "$ref": "#/components/schemas/HTTPValidationError" |
There was a problem hiding this comment.
Use the Range42 envelope for v1 422 responses
This newly added v1 operation documents validation failures as FastAPI's default HTTPValidationError, but app/core/errors.py:134-151 installs a RequestValidationError handler that returns the canonical Range42 envelope (error, message, code, details, trace_id, timestamp) promised for every v1 error in README.md:423-424. Clients generated from this committed gateway spec will deserialize 422s with the wrong shape for invalid project payloads and the other added v1 routes that copy this response.
Useful? React with 👍 / 👎.
| "content": { | ||
| "application/json": { | ||
| "schema": {} |
There was a problem hiding this comment.
Document the events stream as text/event-stream
The /v1/deployments/{deployment_id}/events route returns EventSourceResponse from app/routes/v1/deployments/events.py:104-105, so successful responses are SSE (text/event-stream), not JSON. Since this committed spec is used to bootstrap the gateway and generated clients, advertising application/json here will make consumers treat the long-lived event stream as a JSON response instead of opening/parsing SSE events.
Useful? React with 👍 / 👎.
The root openapi.json bootstraps the Kong gateway config but nothing regenerates or verifies it, so it had drifted to the pre-v1 API: 84 paths, none of them /v1. Regenerated per the README recipe. 84 -> 121 paths, purely additive (0 removed): the whole v1 surface — deployments (incl. SSE events, preflight, rollback, snapshots, timings), projects, catalog sources/entries, proxmox hosts/vms/storage/tasks, health and admin stats/retention.
d937996 to
a40646c
Compare
|
Both Codex points are correct, and both are defects in the app, not in the regeneration — the spec faithfully reports what FastAPI declares today, so they need route-level fixes rather than a different regen. Filing them as follow-ups rather than holding this PR, since merging it strictly improves the committed spec (the whole
Worth noting these are exactly the kind of drift that went unnoticed because nothing regenerates or checks this file — it had rotted back to the pre-v1 API (84 paths, zero |
The root
openapi.jsonis what bootstraps the Kong gateway config, but nothing regenerates or verifies it — so it had drifted all the way back to the pre-v1 API. Regenerated with the recipe inREADME.md.84 → 121 paths, purely additive — 0 removed. Everything gained is
/v1:attempts,cancel,events(SSE),preflight,rollback,snapshot(s),timings, per-teamresetcompose,validatesources(+refresh),entrieshosts(+health),vms(+status/{action},snapshots, rollback),storage(+content,download-url),tasks/{upid}/statushealth,health/ready,admin/stats,admin/retentionNo behaviour change — generated artifact only.
pytestis unchanged fromdev(the singletest_expand_replication_vectorsfailure is the cross-repo overlay drift fixed in #114).Sequencing note: #113 removes 5 v0 bundle routes and edits this file surgically. Once both land I'll re-run the regen so the spec matches the merged surface rather than resolving the two by hand.
Nothing regenerates this file automatically — it will rot again. A drift check mirroring the
generated.pyone inschema-and-operatorswould prevent that; happy to add it if wanted (it would start failing any PR that changes routes without regenerating).