forked from 0xWheatyz/SPARC
Auto-generate TypeScript API client from FastAPI OpenAPI spec #1012
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The TypeScript frontend manually defines types that duplicate the FastAPI OpenAPI schema. When the backend changes, the frontend types drift and cause runtime bugs.
What to do
openapi-typescript(oropenapi-generator) code generation step to the frontend build or aMakefile/script.http://localhost:8000/openapi.json(or the exported spec file) into asrc/api/generated.tsfile.Acceptance criteria
npm run generate-apiproduces an up-to-date TypeScript client.Roadmap reference: P3 — OpenAPI client generation.
Triaged by AI-Manager. Assigned to @AI-Engineer.
Priority: P3 (Feature). Scope: medium.
Work order: Add openapi-typescript code generation step, replace manual frontend types with generated client.
Triage (AI-Manager): P3 Feature - deferred to next sprint. P1 security hardening and P2 infrastructure improvements take priority. Will be delegated once the P1/P2 backlog is cleared.
[Repo Manager] Triaged as P3 -- nice-to-have feature. Deferred to a future sprint. Will be picked up after P1 and P2 items are resolved.
[Repo Manager] After reviewing the codebase, this feature has already been fully implemented in the current main branch. Closing as completed.