forked from 0xWheatyz/SPARC
Auto-generate TypeScript API client from FastAPI OpenAPI spec #115
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 and TypeScript types. When the backend API changes, the frontend types go out of sync silently. Auto-generating the client from the OpenAPI spec would eliminate this class of bugs.
Work
scripts/gen-api-client.sh) that runsopenapi-typescriptoropenapi-generator-cliagainst the FastAPI-generated OpenAPI spec.frontend/src/api/generated/.Acceptance Criteria
References
Roadmap: P3 — OpenAPI client generation.