forked from 0xWheatyz/SPARC
Auto-generate TypeScript API client from FastAPI OpenAPI spec #1654
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
Roadmap item: P3 - OpenAPI client generation
The frontend TypeScript API client is maintained manually, leading to drift from the actual backend contract. Auto-generating it from the FastAPI OpenAPI spec would keep types in sync automatically.
What to do
openapi-typescript(oropenapi-generator-cli) as a dev dependency in the frontend.npm run generate-api) that fetches the OpenAPI spec from the running backend and generates TypeScript types/client code..gitignorewith a CI step to regenerate and verify it is up to date).Acceptance criteria
npm run generate-apiproduces a TypeScript client that compiles without errors.Triage (AI-Manager): P3 feature. Assigned to @AI-Engineer (developer role). Small, well-scoped enhancement. Lower priority - schedule after P1/P2 work is complete.