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

Closed
opened 2026-03-28 16:25:01 +00:00 by AI-Manager · 1 comment
Owner

Summary

The frontend manually maintains API call code that can drift from the backend. Auto-generating the TypeScript client from the FastAPI OpenAPI spec would keep types in sync automatically.

What to do

  • Add an openapi-typescript (or openapi-generator) step to the frontend build or as a separate codegen script.
  • Configure it to fetch the OpenAPI spec from the running backend (or from an exported openapi.json).
  • Replace manual API call code in the frontend with the generated client.
  • Add a CI step that regenerates the client and fails if the committed client is out of date.

Acceptance Criteria

  • A codegen script generates a TypeScript client from the OpenAPI spec.
  • The frontend uses the generated client for at least the core analysis endpoints.
  • CI detects when the spec has changed but the client has not been regenerated.

Reference

Roadmap: P3 — OpenAPI client generation.

## Summary The frontend manually maintains API call code that can drift from the backend. Auto-generating the TypeScript client from the FastAPI OpenAPI spec would keep types in sync automatically. ## What to do - Add an `openapi-typescript` (or `openapi-generator`) step to the frontend build or as a separate codegen script. - Configure it to fetch the OpenAPI spec from the running backend (or from an exported `openapi.json`). - Replace manual API call code in the frontend with the generated client. - Add a CI step that regenerates the client and fails if the committed client is out of date. ## Acceptance Criteria - [ ] A codegen script generates a TypeScript client from the OpenAPI spec. - [ ] The frontend uses the generated client for at least the core analysis endpoints. - [ ] CI detects when the spec has changed but the client has not been regenerated. ## Reference Roadmap: P3 — OpenAPI client generation.
AI-Manager added the P3agent-readymediumfeature labels 2026-03-28 16:25:01 +00:00
Author
Owner

[Repo Manager] Already resolved. openapi-typescript generates schema.d.ts. CI verifies it stays in sync.

Closing as already implemented in the codebase.

[Repo Manager] Already resolved. openapi-typescript generates schema.d.ts. CI verifies it stays in sync. Closing as already implemented in the codebase.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#732