forked from 0xWheatyz/SPARC
Auto-generate TypeScript API client from FastAPI OpenAPI spec #1567
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 API call code that can drift from the actual FastAPI schema. Auto-generating the TypeScript client from the OpenAPI spec eliminates this class of mismatch.
Roadmap reference: ROADMAP.md > P3 > OpenAPI client generation
What to do
openapi-typescript(or@hey-api/openapi-ts) as a frontend dev dependency.generate:apithat fetches the OpenAPI spec from the running backend and generates a typed client intosrc/api/generated/.fetch/axioscalls with the generated client.generate:apiand check for a git diff).Acceptance criteria
npm run generate:apiproduces a TypeScript client with no manual edits required.This issue has been resolved. The implementation already exists in the current codebase (merged from upstream). Verified by repo manager during triage on 2026-04-19.