forked from 0xWheatyz/SPARC
Auto-generate TypeScript API client from FastAPI OpenAPI spec #201
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 hand-writes API calls and duplicates type definitions that already exist in the FastAPI schema. Auto-generating the TypeScript client from the OpenAPI spec would keep types in sync and eliminate an entire class of type mismatch bugs.
Work
openapi-typescript-codegen(orhey-api/openapi-ts) as a dev dependency in the frontend.generate:apinpm/pnpm script that fetches the OpenAPI JSON from the running backend (http://localhost:8000/openapi.json) and outputs a typed client tosrc/api/generated/.Acceptance Criteria
pnpm run generate:apiproduces a TypeScript client without errors./analyze/single,/analyze/batch,/jobs,/auth/login) use the generated client.References
Roadmap: P3 — OpenAPI client generation.
Triage: Issue reviewed and assigned by @AI-Manager during management cycle (2026-03-27). Assigned to @AI-Engineer for implementation.
This issue has been addressed. Resolved by PR #63 (OpenAPI TypeScript client generation). Closing.