Added openapi based api client

This commit is contained in:
GW_MC
2025-12-05 20:28:59 +08:00
parent 1c051f9502
commit a7524ab076
11 changed files with 1111 additions and 18 deletions

View File

@@ -7,12 +7,15 @@
"dev": "react-router dev",
"start": "react-router-serve ./build/server/index.js",
"typecheck": "react-router typegen && tsc",
"test": "echo \"No tests specified\" && exit 0"
"test": "echo \"No tests specified\" && exit 0",
"generate:openapi": "typed-openapi ../api/swagger.json --tanstack tanstack-client.ts -o ./app/generated/api-client.ts"
},
"dependencies": {
"@radix-ui/themes": "^3.2.1",
"@react-router/node": "^7.9.2",
"@react-router/serve": "^7.9.2",
"@tanstack/react-query": "^5.90.12",
"axios": "^1.13.2",
"isbot": "^5.1.31",
"radix-ui": "^1.4.3",
"react": "^19.1.1",
@@ -27,6 +30,7 @@
"@types/react-dom": "^19.1.9",
"dotenv": "^17.2.3",
"tailwindcss": "^4.1.13",
"typed-openapi": "^2.2.3",
"typescript": "^5.9.2",
"vite": "^7.1.7",
"vite-tsconfig-paths": "^5.1.4"