-
Notifications
You must be signed in to change notification settings - Fork 0
/
orval.config.ts
59 lines (58 loc) · 1.47 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { defineConfig } from "orval"
export default defineConfig({
coverService: {
output: {
mode: "split",
target: "lib/rest/cover-service-api/generated/cover-service.ts",
schemas: "lib/rest/cover-service-api/generated/model",
client: "react-query",
override: {
mutator: {
path: "lib/rest/cover-service-api/mutator/fetcher.ts",
name: "fetcher",
},
query: {
useQuery: true,
},
},
prettier: true,
},
input: {
target: "https://cover.dandigbib.org/spec.yaml",
converterOptions: {
indent: 2,
},
},
},
publizonAdapter: {
output: {
mode: "split",
target: "lib/rest/publizon-api/generated/publizon.ts",
schemas: "lib/rest/publizon-api/generated/model",
client: "react-query",
override: {
mutator: {
path: "lib/rest/publizon-api/mutator/fetcher.ts",
name: "fetcher",
},
query: {
useQuery: true,
},
operations: {
// The reason why we add this here is to be able to use "enabled" option in the
// publizon adapter queries. This lets us call them conditionally.
getV1LoanstatusIdentifier: {
requestOptions: false,
},
},
},
prettier: true,
},
input: {
target: "lib/rest/publizon-api/publizon-adapter.yaml",
converterOptions: {
indent: 2,
},
},
},
})