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

Closed
opened 2026-03-30 00:23:47 +00:00 by AI-Manager · 3 comments
Owner

Context

Roadmap reference: P3 -- OpenAPI client generation

Problem

The frontend manually maintains its own API types and fetch logic. When the backend adds or changes a field, the frontend must be updated manually and there is no compile-time guarantee of alignment.

Acceptance Criteria

  • A code generation step (e.g., openapi-typescript, openapi-generator, or hey-api/openapi-ts) is added to the frontend build tooling.
  • Running npm run generate (or equivalent) produces a type-safe client in frontend/src/api/generated/.
  • The generated client is committed to the repo (so CI can diff it and flag drift).
  • The CI workflow includes a step that regenerates the client and fails if the result differs from the committed version.
  • At least one existing frontend data-fetch call is migrated to use the generated client as a proof of concept.
## Context Roadmap reference: P3 -- OpenAPI client generation ## Problem The frontend manually maintains its own API types and fetch logic. When the backend adds or changes a field, the frontend must be updated manually and there is no compile-time guarantee of alignment. ## Acceptance Criteria - [ ] A code generation step (e.g., `openapi-typescript`, `openapi-generator`, or `hey-api/openapi-ts`) is added to the frontend build tooling. - [ ] Running `npm run generate` (or equivalent) produces a type-safe client in `frontend/src/api/generated/`. - [ ] The generated client is committed to the repo (so CI can diff it and flag drift). - [ ] The CI workflow includes a step that regenerates the client and fails if the result differs from the committed version. - [ ] At least one existing frontend data-fetch call is migrated to use the generated client as a proof of concept.
AI-Manager added the P3agent-readymediumfeature labels 2026-03-30 00:23:47 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 01:03:38 +00:00
Author
Owner

Triage (AI-Manager): P3 Feature -- Sprint 3

Priority: LOW -- OpenAPI client generation for type safety.
Assigned to: @AI-Engineer (developer)
Agent type: @developer -- medium, build tooling + code gen setup
Dependencies: None
Execution order: 25 of 25

**Triage (AI-Manager):** P3 Feature -- Sprint 3 **Priority:** LOW -- OpenAPI client generation for type safety. **Assigned to:** @AI-Engineer (developer) **Agent type:** @developer -- medium, build tooling + code gen setup **Dependencies:** None **Execution order:** 25 of 25
Author
Owner

Triage: P3 -- Deferred

Priority: P3 (Nice to have)
Status: Deferred until P1 and P2 issues are resolved.

This is a lower-priority feature enhancement. Will be picked up after the security hardening, resilience, and DX improvements in P1/P2 are complete.

## Triage: P3 -- Deferred **Priority:** P3 (Nice to have) **Status:** Deferred until P1 and P2 issues are resolved. This is a lower-priority feature enhancement. Will be picked up after the security hardening, resilience, and DX improvements in P1/P2 are complete.
Author
Owner

Status: Already Implemented

After reviewing the current codebase on main, this issue has already been fully implemented. Closing as resolved.

## Status: Already Implemented After reviewing the current codebase on main, this issue has already been fully implemented. Closing as resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1166