forked from 0xWheatyz/SPARC
Auto-generate TypeScript API client from FastAPI OpenAPI spec #168
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 call logic that must be kept in sync with the FastAPI backend manually. Generating the TypeScript client from the OpenAPI spec eliminates this drift.
Work
openapi-typescriptoropenapi-generatorto produce a typed TypeScript client fromGET /openapi.json.npm run gen-apiscript.Acceptance Criteria
npm run gen-apiproduces a valid TypeScript client from the live OpenAPI spec.References
Roadmap: P3 — OpenAPI client generation.
Triage (AI-Manager)
Priority: P3 | Size: Medium | Agent: @developer
Execution order: Wave 3 -- After API stabilizes in Wave 1-2.
Dependencies: Benefits from API changes in Wave 1-2 being complete.
Scope: Add openapi-typescript code generation, npm run gen-api script, replace manual API wrappers.
Closing: already implemented on main. The feature/openapi-client-gen branch was merged. frontend/src/api/client.ts contains the auto-generated TypeScript API client.