forked from danskernesdigitalebibliotek/dpl-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorval.config.ts
More file actions
78 lines (77 loc) · 1.8 KB
/
orval.config.ts
File metadata and controls
78 lines (77 loc) · 1.8 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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
}
}
}
});