-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathopenapi-ts.config.ts
More file actions
43 lines (41 loc) · 943 Bytes
/
openapi-ts.config.ts
File metadata and controls
43 lines (41 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { defineConfig } from '@hey-api/openapi-ts';
const sharedPlugins = [
{
name: '@hey-api/client-fetch',
runtimeConfigPath: './src/lib/api/internal/runtime-config.ts',
throwOnError: true,
},
{
name: '@hey-api/sdk',
auth: false,
operations: { strategy: 'flat' },
responseStyle: 'data',
transformer: true,
},
{
name: '@hey-api/typescript',
enums: { mode: 'javascript', case: 'PascalCase' },
},
{
name: '@hey-api/transformers',
dates: true,
},
] as const;
export default defineConfig([
{
input: 'https://api.openshock.dev/swagger/1/swagger.json',
output: {
path: 'src/lib/api/internal/v1',
postProcess: ['prettier'],
},
plugins: sharedPlugins,
},
{
input: 'https://api.openshock.dev/swagger/2/swagger.json',
output: {
path: 'src/lib/api/internal/v2',
postProcess: ['prettier'],
},
plugins: sharedPlugins,
},
]);