@@ -24,6 +24,7 @@ export interface Options {
24
24
exportModels ?: boolean ;
25
25
exportSchemas ?: boolean ;
26
26
write ?: boolean ;
27
+ useDateType ?: boolean ;
27
28
}
28
29
29
30
/**
@@ -52,6 +53,7 @@ export async function generate({
52
53
exportModels = true ,
53
54
exportSchemas = false ,
54
55
write = true ,
56
+ useDateType = false ,
55
57
} : Options ) : Promise < void > {
56
58
const openApi = isString ( input ) ? await getOpenApiSpec ( input ) : input ;
57
59
const openApiVersion = getOpenApiVersion ( openApi ) ;
@@ -62,15 +64,15 @@ export async function generate({
62
64
const client = parseV2 ( openApi ) ;
63
65
const clientFinal = postProcessClient ( client ) ;
64
66
if ( ! write ) break ;
65
- await writeClient ( clientFinal , templates , output , httpClient , useOptions , useUnionTypes , exportCore , exportServices , exportModels , exportSchemas ) ;
67
+ await writeClient ( clientFinal , templates , output , httpClient , useOptions , useUnionTypes , exportCore , exportServices , exportModels , exportSchemas , useDateType ) ;
66
68
break ;
67
69
}
68
70
69
71
case OpenApiVersion . V3 : {
70
72
const client = parseV3 ( openApi ) ;
71
73
const clientFinal = postProcessClient ( client ) ;
72
74
if ( ! write ) break ;
73
- await writeClient ( clientFinal , templates , output , httpClient , useOptions , useUnionTypes , exportCore , exportServices , exportModels , exportSchemas ) ;
75
+ await writeClient ( clientFinal , templates , output , httpClient , useOptions , useUnionTypes , exportCore , exportServices , exportModels , exportSchemas , useDateType ) ;
74
76
break ;
75
77
}
76
78
}
0 commit comments