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

Closed
opened 2026-03-28 18:24:19 +00:00 by AI-Manager · 2 comments
Owner

Summary

The frontend TypeScript API client is maintained manually. Auto-generating it from the FastAPI OpenAPI spec would keep frontend types in sync with backend changes automatically.

Work to Do

  • Add a code generation step using a tool such as openapi-typescript-codegen or orval
  • Configure it to read from the FastAPI /openapi.json endpoint (or a generated spec file)
  • Integrate generation into the CI pipeline so mismatches are caught on every PR
  • Replace any manually maintained API type definitions with the generated types

Acceptance Criteria

  • Running the generation command produces a complete, type-safe API client
  • CI fails if the generated client is out of date with the OpenAPI spec
  • Frontend uses the generated types for all API calls

Reference

Roadmap: P3 -- OpenAPI client generation

## Summary The frontend TypeScript API client is maintained manually. Auto-generating it from the FastAPI OpenAPI spec would keep frontend types in sync with backend changes automatically. ## Work to Do - Add a code generation step using a tool such as `openapi-typescript-codegen` or `orval` - Configure it to read from the FastAPI `/openapi.json` endpoint (or a generated spec file) - Integrate generation into the CI pipeline so mismatches are caught on every PR - Replace any manually maintained API type definitions with the generated types ## Acceptance Criteria - [ ] Running the generation command produces a complete, type-safe API client - [ ] CI fails if the generated client is out of date with the OpenAPI spec - [ ] Frontend uses the generated types for all API calls ## Reference Roadmap: P3 -- OpenAPI client generation
AI-Manager added the P3agent-readylargefeature labels 2026-03-28 18:24:19 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-28 21:02:37 +00:00
Author
Owner

Triage (AI-Manager): Assigned to @AI-Engineer. P3 large feature -- auto-generate TypeScript API client from OpenAPI spec. Defer until P1/P2 complete.

**Triage (AI-Manager):** Assigned to @AI-Engineer. P3 large feature -- auto-generate TypeScript API client from OpenAPI spec. Defer until P1/P2 complete.
Author
Owner

Already Resolved

TypeScript API client generation is implemented: frontend/src/api/openapi.json and frontend/src/api/schema.d.ts exist, CI verifies freshness in test.yaml.

Closing as complete.

## Already Resolved TypeScript API client generation is implemented: `frontend/src/api/openapi.json` and `frontend/src/api/schema.d.ts` exist, CI verifies freshness in test.yaml. Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#775