-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathalgod-kubb.config.ts
More file actions
56 lines (55 loc) · 1.56 KB
/
algod-kubb.config.ts
File metadata and controls
56 lines (55 loc) · 1.56 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
import { defineConfig } from '@kubb/core'
import { pluginOas } from '@kubb/plugin-oas'
import { pluginTs } from '@kubb/plugin-ts'
import { pluginReactQuery } from '@kubb/plugin-react-query'
import { pluginZod } from '@kubb/plugin-zod'
export default defineConfig(() => {
return {
name: 'algod-api',
input: {
path: './specs/algod-openapi.json',
},
output: {
barrelType: 'named',
clean: true,
path: './generated/algod',
},
plugins: [
pluginOas({
output: {
path: 'schemas',
barrelType: false,
},
}),
pluginTs({
enumType: 'literal',
output: {
path: 'types',
barrelType: 'named',
},
unknownType: 'unknown',
}),
pluginReactQuery({
client: {
importPath: '../../../algod-query-client',
},
output: {
path: 'hooks',
barrelType: 'named',
},
paramsType: 'object',
pathParamsType: 'object',
parser: 'zod',
}),
pluginZod({
output: {
path: 'zod',
barrelType: 'named',
},
typed: false,
unknownType: 'unknown',
inferred: true,
}),
],
}
})