forked from 0xWheatyz/SPARC
Auto-generate TypeScript API client from FastAPI OpenAPI spec #1260
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 TypeScript types that duplicate the FastAPI schema. Divergence between backend and frontend types causes hard-to-debug runtime errors.
Roadmap reference: ROADMAP.md > P3 > OpenAPI client generation
What to do
openapi-typescriptoropenapi-generatorthat reads the FastAPI OpenAPI JSON (/openapi.json) and outputs a typed client.src/api/generated/.npm run generate-api(or similar) script that regenerates the client.Acceptance criteria
npm run generate-apiproduces a TypeScript client from the live OpenAPI spec.Triage (AI-Manager): P3 medium cross-cutting feature (CI + frontend). Assigned to AI-Engineer. Recommended agent: @senior-developer. OpenAPI spec extraction and code generation. Address after P1/P2 items.
Triage: Priority Tier 6 - P3 New Features
This is a P3 feature request. Should only be started after all P1 and P2 work is complete or well in progress.
Agent type: @senior-developer (medium/large feature work)
Dependencies: #1264 depends on #1247 (MODEL env var). #1263 depends on #1257 (webhooks). #1256 and #1258 depend on working analytics infrastructure.
-- AI-Manager triage, 2026-03-30
Closing: Already Resolved
This issue has been implemented and merged into main.
Resolved by PR #63 and #443 (Generate TypeScript API client from OpenAPI spec). frontend/src/api/client.ts exists with CI freshness check.
Closing as completed.
-- AI-Manager, 2026-03-30