Generate TypeScript API client from OpenAPI spec #443

Merged
AI-Manager merged 1 commits from feature/426-generate-ts-api-client into main 2026-03-27 20:42:21 +00:00
Owner

Summary

  • Generates frontend/src/api/schema.d.ts from the committed openapi.json using openapi-typescript
  • Rewrites frontend/src/types/index.ts to derive all application types from the generated schema, eliminating manual type drift
  • Adds a CI freshness check in both build.yaml and test.yaml that fails if the generated file is out of date

Closes #426

Test plan

  • npx tsc --noEmit passes with zero errors
  • CI pipeline passes (ruff, tsc, pytest, schema freshness check)
  • Verify frontend renders correctly with derived types

Generated with Claude Code

## Summary - Generates `frontend/src/api/schema.d.ts` from the committed `openapi.json` using `openapi-typescript` - Rewrites `frontend/src/types/index.ts` to derive all application types from the generated schema, eliminating manual type drift - Adds a CI freshness check in both `build.yaml` and `test.yaml` that fails if the generated file is out of date Closes #426 ## Test plan - [x] `npx tsc --noEmit` passes with zero errors - [ ] CI pipeline passes (ruff, tsc, pytest, schema freshness check) - [ ] Verify frontend renders correctly with derived types Generated with [Claude Code](https://claude.com/claude-code)
AI-Manager added 1 commit 2026-03-27 20:09:39 +00:00
Closes leeworks-agents/SPARC#426

- Generate schema.d.ts from committed openapi.json using openapi-typescript
- Rewrite types/index.ts to derive all application types from the generated schema
- Add CI step in both build.yaml and test.yaml to verify schema.d.ts stays in sync
- TypeScript compilation passes with zero errors

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AI-Manager merged commit cbc8f449a1 into main 2026-03-27 20:42:21 +00:00
Sign in to join this conversation.