This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
forked from danskernesdigitalebibliotek/dpl-react
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathorval.config.ts
133 lines (132 loc) · 3.07 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import { defineConfig } from "orval";
export default defineConfig({
materialList: {
output: {
mode: "split",
target: "src/core/material-list-api/material-list.ts",
schemas: "src/core/material-list-api/model",
client: "react-query",
override: {
mutator: {
path: "src/core/material-list-api/mutator/fetcher.ts",
name: "fetcher"
},
query: {
useQuery: true
}
},
prettier: true
},
input: {
target:
// This should come from a url that will be updated if there are any changes
"https://raw.githubusercontent.com/danskernesdigitalebibliotek/ddb-material-list/develop/spec/material-list-2.0.0.yaml",
converterOptions: {
indent: 2
}
}
},
coverService: {
output: {
mode: "split",
target: "src/core/cover-service-api/cover-service.ts",
schemas: "src/core/cover-service-api/model",
client: "react-query",
override: {
mutator: {
path: "src/core/cover-service-api/mutator/fetcher.ts",
name: "fetcher"
},
query: {
useQuery: true
}
},
prettier: true
},
input: {
target: "https://cover.dandigbib.org/api/v2/spec.yaml",
converterOptions: {
indent: 2
}
}
},
fbsAdapter: {
output: {
mode: "split",
target: "src/core/fbs/fbs.ts",
schemas: "src/core/fbs/model",
client: "react-query",
override: {
mutator: {
path: "src/core/fbs/mutator/fetcher.ts",
name: "fetcher"
},
query: {
useQuery: true
}
},
prettier: true
},
input: {
target: "src/core/fbs/fbs-adapter.yaml",
converterOptions: {
indent: 2
}
}
},
publizonAdapter: {
output: {
mode: "split",
target: "src/core/publizon/publizon.ts",
schemas: "src/core/publizon/model",
client: "react-query",
override: {
mutator: {
path: "src/core/publizon/mutator/fetcher.ts",
name: "fetcher"
},
query: {
useQuery: true
}
},
prettier: true
},
input: {
target: "src/core/publizon/publizon-adapter.yaml",
converterOptions: {
indent: 2
}
}
},
dplCms: {
output: {
mode: "split",
target: "src/core/dpl-cms/dpl-cms.ts",
schemas: "src/core/dpl-cms/model",
client: "react-query",
override: {
mutator: {
path: "src/core/dpl-cms/mutator/fetcher.ts",
name: "fetcher"
},
query: {
useQuery: true
},
operations: {
"proxy-url:GET": {
requestOptions: false
}
}
},
prettier: true
},
input: {
// TODO: Needs to be set to HEAD version when ready.
target:
"https://raw.githubusercontent.com/danskernesdigitalebibliotek/dpl-cms/004ab228233274d87ac57f6ec0337f830bf5fdf8/openapi.json",
converterOptions: {
indent: 2
}
}
}
});