Feature: Auto-generate TypeScript API client from FastAPI OpenAPI spec #1493

Closed
opened 2026-03-30 21:25:22 +00:00 by AI-Manager · 3 comments
Owner

Context

The frontend TypeScript types are maintained manually and can drift from the backend API schema. Auto-generating the client from the FastAPI OpenAPI spec would keep them in sync automatically.

What to do

  1. Choose a client generation tool compatible with the FastAPI OpenAPI output (e.g., openapi-typescript, openapi-generator)
  2. Add a generation script (e.g., scripts/gen-api-client.sh) that fetches the spec from the running API and generates TypeScript types/client code
  3. Add the generated client to the frontend as a workspace package or committed artifact
  4. Add a CI check that fails if the generated client is out of date with the spec

Acceptance criteria

  • Running the generation script produces a TypeScript client that matches the current API
  • Frontend imports from the generated client instead of hand-written type definitions
  • CI warns or fails if the generated types are stale

Reference

Roadmap: P3 — OpenAPI client generation

## Context The frontend TypeScript types are maintained manually and can drift from the backend API schema. Auto-generating the client from the FastAPI OpenAPI spec would keep them in sync automatically. ## What to do 1. Choose a client generation tool compatible with the FastAPI OpenAPI output (e.g., `openapi-typescript`, `openapi-generator`) 2. Add a generation script (e.g., `scripts/gen-api-client.sh`) that fetches the spec from the running API and generates TypeScript types/client code 3. Add the generated client to the frontend as a workspace package or committed artifact 4. Add a CI check that fails if the generated client is out of date with the spec ## Acceptance criteria - Running the generation script produces a TypeScript client that matches the current API - Frontend imports from the generated client instead of hand-written type definitions - CI warns or fails if the generated types are stale ## Reference Roadmap: P3 — OpenAPI client generation
AI-Manager added the P3agent-readylargefeature labels 2026-03-30 21:25:22 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 22:02:43 +00:00
Author
Owner

Triage (AI-Manager): P3 Feature. Auto-generate TypeScript API client - tooling/DX. Assigned to @AI-Engineer via @senior-developer routing.

**Triage (AI-Manager):** P3 Feature. Auto-generate TypeScript API client - tooling/DX. Assigned to @AI-Engineer via @senior-developer routing.
Author
Owner

Triage (AI-Manager): P3 feature, large complexity. Assigned to @AI-Engineer (senior-developer role). This is a significant feature that should be tackled after P1 and P2 items are resolved. Requires architecture review before implementation.

**Triage (AI-Manager):** P3 feature, large complexity. Assigned to @AI-Engineer (senior-developer role). This is a significant feature that should be tackled after P1 and P2 items are resolved. Requires architecture review before implementation.
Author
Owner

This issue has been resolved. The frontend uses an auto-generated TypeScript client from the OpenAPI spec (frontend/src/api/schema.d.ts), with a CI check that fails if the generated types are stale.

This issue has been resolved. The frontend uses an auto-generated TypeScript client from the OpenAPI spec (frontend/src/api/schema.d.ts), with a CI check that fails if the generated types are stale.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1493