Commit 019c985
committed
feat(frontend): typed API client generated from the OpenAPI spec + gen-verify CI
The code-first OpenAPI generator landed on main (covering projects + sessions),
superseding this branch's backend work. This repurposes the PR to the parts main
still lacks:
- frontend/src/api/schema.d.ts — generated from backend/internal/httpd/apispec/
openapi.yaml via openapi-typescript (`npm run gen:api`); covers projects,
sessions, and orchestrators.
- frontend/src/api/client.ts — a small openapi-fetch client typed by that schema,
so the renderer's request/response types come from the daemon contract instead
of being hand-maintained.
- CI gen-verify job — regenerates the spec from Go and the TS client from the
spec, failing if either committed artifact is stale. Backend drift is also
covered by the apispec tests; this additionally guards the frontend artifact,
which nothing else checks.
Frontend typecheck passes; the gen pipeline reproduces the committed files with
no drift.1 parent 9058017 commit 019c985
5 files changed
Lines changed: 1283 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
0 commit comments