生产管理系统前端 - openapi - fetch生成器开发

This commit is contained in:
2025-10-27 21:53:18 +08:00
parent 5055e40de6
commit 42a4a9f566
29 changed files with 4264 additions and 1463 deletions

View File

@@ -0,0 +1,17 @@
import { defineConfig } from "@hey-api/openapi-ts";
// 获取环境变量配置
const baseUrl = process.env.API_BASE_URL || 'http://localhost:8080';
export default defineConfig({
client: "@hey-api/client-fetch",
input: `${baseUrl}/openapi.json`,
output: "./src/lib/api",
schemas: {
name: "types.gen.ts",
},
services: {
name: "sdk.gen.ts",
},
clientName: "client.gen.ts",
});