File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
utils/writeClientCustomTemplate Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -156,8 +156,11 @@ export const generate = async ({
156
156
useUnionTypes ,
157
157
indent ,
158
158
postfixServices ,
159
+ postfixModels ,
159
160
serviceTemplate ,
160
161
exportClient ,
162
+ exportModels ,
163
+ exportSchemas ,
161
164
clientName
162
165
) ;
163
166
Original file line number Diff line number Diff line change @@ -18,9 +18,12 @@ export const writeClientServicesCustomTemplate = async (
18
18
useOptions : boolean ,
19
19
useUnionTypes : boolean ,
20
20
indent : Indent ,
21
- postfix : string ,
21
+ postfixServices : string ,
22
+ postfixModels : string ,
22
23
templatePath : string ,
23
24
exportClient : boolean ,
25
+ exportModels : boolean ,
26
+ exportSchemas : boolean ,
24
27
clientName ?: string
25
28
) => {
26
29
registerHandlebarTemplates ( {
@@ -40,15 +43,18 @@ export const writeClientServicesCustomTemplate = async (
40
43
await mkdir ( servicesDir ) ;
41
44
42
45
for ( const service of client . services ) {
43
- const file = resolve ( outputPath , `services/${ service . name } ${ postfix } .ts` ) ;
46
+ const file = resolve ( outputPath , `services/${ service . name } ${ postfixServices } .ts` ) ;
44
47
const templateResult = serviceTemplate ( {
45
48
...service ,
46
49
serviceBaseUrl : client . server ,
47
50
httpClient,
48
51
useUnionTypes,
49
52
useOptions,
50
- postfix,
53
+ postfixServices,
54
+ postfixModels,
51
55
exportClient : isDefined ( clientName ) && exportClient ,
56
+ exportModels,
57
+ exportSchemas,
52
58
} ) ;
53
59
await writeFile ( file , i ( f ( templateResult ) , indent ) ) ;
54
60
}
You can’t perform that action at this time.
0 commit comments