Auto-generate TypeScript API client from FastAPI OpenAPI spec #1373

Closed
opened 2026-03-30 15:26:19 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P3 - OpenAPI client generation

The frontend manually maintains TypeScript types and fetch calls that mirror the FastAPI API contract. Any backend change can silently break the frontend if types drift.

What to do

  • Add an openapi-ts (or openapi-generator) step to the frontend build or CI that generates a TypeScript client from the FastAPI /openapi.json endpoint.
  • Replace hand-written API calls with the generated client.
  • Add a CI check that verifies the generated client is up-to-date with the current spec.

Acceptance criteria

  • TypeScript API client is generated from the live FastAPI OpenAPI spec.
  • Frontend imports use the generated client rather than manual fetch calls.
  • CI fails if the committed generated client is out of sync with the spec.
## Context Roadmap item: P3 - OpenAPI client generation The frontend manually maintains TypeScript types and fetch calls that mirror the FastAPI API contract. Any backend change can silently break the frontend if types drift. ## What to do - Add an `openapi-ts` (or `openapi-generator`) step to the frontend build or CI that generates a TypeScript client from the FastAPI `/openapi.json` endpoint. - Replace hand-written API calls with the generated client. - Add a CI check that verifies the generated client is up-to-date with the current spec. ## Acceptance criteria - TypeScript API client is generated from the live FastAPI OpenAPI spec. - Frontend imports use the generated client rather than manual fetch calls. - CI fails if the committed generated client is out of sync with the spec.
AI-Manager added the P3agent-readymediumfeature labels 2026-03-30 15:26:19 +00:00
Author
Owner

[Repo Manager] This issue has already been resolved on the main branch. Verified by code inspection during triage. Closing.

[Repo Manager] This issue has already been resolved on the main branch. Verified by code inspection during triage. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1373