import { defineConfig } from '@hey-api/openapi-ts' export default defineConfig({ input: process.env.OPENAPI_INPUT ?? 'http://localhost:9810/openapi.json', output: '../shared/api/client', parser: { patch: { // FastAPI operationId("get_feed_v1_feed_get")에서 "_v1_" 앞만 camelCase로 → getFeed / getFeedOptions / addCommentMutation operations: (_method, _path, operation) => { const id = operation.operationId ?? '' const base = id.split('_v1_')[0] || id operation.operationId = base.replace(/_([a-z])/g, (_m, c: string) => c.toUpperCase()) }, }, }, plugins: [ { name: '@hey-api/client-fetch', throwOnError: true }, { name: '@hey-api/typescript', enums: 'javascript' }, '@hey-api/sdk', '@tanstack/react-query', ], })