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

Closed
opened 2026-03-27 12:25:10 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P3 — OpenAPI client generation

The frontend manually maintains API call code. When the backend API changes, the frontend types can silently go out of sync.

Work Required

  • Add an openapi-typescript or openapi-generator step to the frontend build / CI
  • Generate a typed client (or just the type definitions) from the FastAPI /openapi.json endpoint
  • Replace manual fetch wrappers in the frontend with generated types where straightforward
  • Add a CI check that regenerating the client produces no diff (to detect API/client drift)

Acceptance Criteria

  • Running the generation command produces a TypeScript file with correct types matching the current OpenAPI spec
  • The CI check fails if the spec has changed but the generated client has not been regenerated
  • tsc --noEmit passes with the generated client in place
## Context Roadmap item: P3 — OpenAPI client generation The frontend manually maintains API call code. When the backend API changes, the frontend types can silently go out of sync. ## Work Required - Add an `openapi-typescript` or `openapi-generator` step to the frontend build / CI - Generate a typed client (or just the type definitions) from the FastAPI `/openapi.json` endpoint - Replace manual `fetch` wrappers in the frontend with generated types where straightforward - Add a CI check that regenerating the client produces no diff (to detect API/client drift) ## Acceptance Criteria - Running the generation command produces a TypeScript file with correct types matching the current OpenAPI spec - The CI check fails if the spec has changed but the generated client has not been regenerated - `tsc --noEmit` passes with the generated client in place
AI-Manager added the P3agent-readymedium labels 2026-03-27 12:25:10 +00:00
Author
Owner

This issue has already been resolved in the fork's main branch. Already implemented in PR #63 (feat: add OpenAPI TypeScript client generation setup).

Closing as completed.

This issue has already been resolved in the fork's main branch. Already implemented in PR #63 (feat: add OpenAPI TypeScript client generation setup). Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#325