forked from 0xWheatyz/SPARC
Auto-generate TypeScript API client from FastAPI OpenAPI spec #1093
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
Roadmap reference: P3 / OpenAPI client generation
The frontend currently maintains hand-written API call code that can drift from the actual backend schema. Auto-generating the TypeScript client from the FastAPI OpenAPI spec would keep types in sync automatically.
What to do
openapi-typescript(oropenapi-generator) step to the frontend build or a dedicated script.http://localhost:8000/openapi.json(or the deployed URL).fetchwrappers in the frontend with the generated client.Acceptance criteria
Resolved by PR #63 (commit
7a364e6) and PR #443 (commit4462061) which set up OpenAPI TypeScript client generation with CI freshness checks. Closing as complete.