forked from 0xWheatyz/SPARC
Auto-generate TypeScript API client from FastAPI OpenAPI spec #753
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 manually maintains TypeScript types that duplicate the FastAPI schema. These can drift out of sync as the API evolves.
What to do
openapi-typescriptoropenapi-generator-cli) to generate a TypeScript client from FastAPI's/openapi.jsonendpointAcceptance criteria
Resolved.
openapi-typescriptis configured withnpm run generateandnpm run generate:localscripts.src/api/schema.d.tsis auto-generated and committed. CI checks for schema drift.