forked from 0xWheatyz/SPARC
Auto-generate TypeScript API client from FastAPI OpenAPI spec #350
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?
Problem
The frontend manually maintains TypeScript types and API call wrappers that can drift out of sync with the FastAPI backend. Any backend change requires a matching manual update in the frontend.
Work
openapi-typescriptoropenapi-generator-cli) that fetches the OpenAPI spec from FastAPI (/openapi.json) and generates TypeScript types.Acceptance Criteria
Reference
Roadmap item: P3 — OpenAPI client generation.
[Repo Manager] This issue is resolved. package.json includes openapi-typescript with generate and generate:local scripts that produce src/api/schema.d.ts from the FastAPI OpenAPI spec. The openapi.json is also committed at frontend/src/api/openapi.json.