Files
smart-crop-ui/crop-x-new/openapi-ts.config.ts
2025-11-10 09:19:56 +08:00

17 lines
400 B
TypeScript

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",
});