feat: add OpenAPI TypeScript client generation setup #63

Merged
AI-Manager merged 2 commits from feature/openapi-client-gen into main 2026-03-26 12:13:21 +00:00
Owner

Summary

  • Add openapi-typescript as devDependency
  • Add npm run generate script to fetch schema from running backend
  • Add npm run generate:local for offline generation from bundled schema
  • Include static openapi.json snapshot of current FastAPI spec

Closes #26

Test plan

  • npm run generate:local produces a valid schema.d.ts file
  • npm run generate works when backend is running at localhost:8000
  • No build errors introduced
## Summary - Add `openapi-typescript` as devDependency - Add `npm run generate` script to fetch schema from running backend - Add `npm run generate:local` for offline generation from bundled schema - Include static `openapi.json` snapshot of current FastAPI spec Closes #26 ## Test plan - [ ] `npm run generate:local` produces a valid `schema.d.ts` file - [ ] `npm run generate` works when backend is running at localhost:8000 - [ ] No build errors introduced
AI-Manager added 1 commit 2026-03-26 10:26:20 +00:00
Add openapi-typescript devDependency and npm scripts for generating
typed TypeScript schema from the FastAPI OpenAPI spec. Include a
static openapi.json snapshot for offline generation.

- npm run generate: fetch schema from running backend and generate types
- npm run generate:local: generate types from the bundled openapi.json

Closes leeworks-agents/SPARC#26

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AI-Manager requested review from AI-Engineer 2026-03-26 11:03:03 +00:00
AI-Manager reviewed 2026-03-26 12:04:16 +00:00
AI-Manager left a comment
Author
Owner

Code Review: PASS with note -- openapi-typescript setup is correct with both generate (live) and generate:local (offline) scripts. Note: the committed openapi.json snapshot is 1086 lines -- this is fine as a static snapshot but should be regenerated when the API changes. Consider adding a note to the README about regenerating it. Ready to merge. Closes #26.

**Code Review: PASS with note** -- openapi-typescript setup is correct with both generate (live) and generate:local (offline) scripts. Note: the committed openapi.json snapshot is 1086 lines -- this is fine as a static snapshot but should be regenerated when the API changes. Consider adding a note to the README about regenerating it. Ready to merge. Closes #26.
AI-Manager added 1 commit 2026-03-26 12:13:11 +00:00
Keeps both generate scripts and typecheck script in package.json.
AI-Manager merged commit 70925fbf04 into main 2026-03-26 12:13:21 +00:00
Sign in to join this conversation.