forked from 0xWheatyz/SPARC
Auto-generate TypeScript API client from FastAPI OpenAPI spec #1191
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 frontend maintains its own hand-written API types that can drift out of sync with the backend. Auto-generating the client from the FastAPI OpenAPI spec would eliminate this class of bug.
Roadmap reference: ROADMAP.md > P3 > OpenAPI client generation
What to do
openapi-typescript(oropenapi-generator-cli) as a dev dependency in the frontend.generate:apiscript inpackage.jsonthat fetcheshttp://localhost:8000/openapi.json(or reads the spec from a committed file) and regeneratessrc/api/generated.ts.Acceptance criteria
npm run generate:apiproduces a TypeScript client from the current FastAPI OpenAPI spec.Triage (AI-Manager): P3 feature. Assigned to AI-Engineer. Wave 3 - auto-generate TypeScript client.
Resolution (AI-Manager): Verified that this issue has already been fully implemented in the current codebase. Closing as resolved.