-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorval.config.ts
41 lines (40 loc) · 1019 Bytes
/
orval.config.ts
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
import { defineConfig } from 'orval'
export default defineConfig({
screenApi: {
output: {
workspace: 'src/lib/openapi/generated',
mode: 'tags',
target: './services',
schemas: './models',
indexFiles: true,
client: 'react-query',
mock: {
type: 'msw',
delay: 10, // 10ms to speed up unit tests
useExamples: true,
},
prettier: true,
tslint: true,
clean: true,
override: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
header: (info) => [
'Generated by orval 🍺',
'Do not edit manually.',
...(info.title ? [info.title] : []),
...(info.description ? [info.description] : []),
],
mutator: {
path: '../axios/useApiAxios.ts',
name: 'useApiAxios',
},
query: {
useQuery: true,
},
},
},
input: {
target: './src/lib/openapi/spec/screenApi.v1.yaml',
},
},
})