feat: add OpenAPI TypeScript client generation setup
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>
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"lint": "eslint .",
|
||||
"generate": "openapi-typescript http://localhost:8000/api/openapi.json -o src/api/schema.d.ts",
|
||||
"generate:local": "openapi-typescript src/api/openapi.json -o src/api/schema.d.ts",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -30,6 +32,7 @@
|
||||
"globals": "^15.8.0",
|
||||
"postcss": "^8.4.39",
|
||||
"tailwindcss": "^3.4.4",
|
||||
"openapi-typescript": "^7.0.0",
|
||||
"typescript": "~5.5.3",
|
||||
"typescript-eslint": "^8.0.0",
|
||||
"vite": "^5.3.3"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user