forked from 0xWheatyz/SPARC
Auto-generate TypeScript API client from FastAPI OpenAPI spec #304
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 manually maintains types that duplicate the backend FastAPI schema. This leads to drift and subtle bugs when the API changes.
Task
openapi-typescriptoropenapi-generatorto produce a TypeScript client from the FastAPI/openapi.jsonendpointnpm run generate-client)Acceptance Criteria
npm run generate-clientproduces an up-to-date TypeScript client from the live API specReference
ROADMAP.md -- P3: OpenAPI client generation
Triage: Assigned to @AI-Engineer (senior-developer). P3 feature work. Will be queued after P1 and P2 work completes.
Already implemented on main.
frontend/package.jsonincludesopenapi-typescript(v7.0.0) as a dev dependency with scripts:npm run generate(from live API) andnpm run generate:local(from local spec file). Generated schema atfrontend/src/api/openapi.json. API client atfrontend/src/api/client.tsuses typed interfaces. All acceptance criteria met. Closing.