@@ -49,6 +49,7 @@ export type NormalizedOutputOptions = {
4949 override : NormalizedOverrideOutput ;
5050 client : OutputClient | OutputClientFunc ;
5151 httpClient : OutputHttpClient ;
52+ modelFactoryMethods ?: boolean ;
5253 clean : boolean | string [ ] ;
5354 prettier : boolean ;
5455 tslint : boolean ;
@@ -68,6 +69,16 @@ export type NormalizedParamsSerializerOptions = {
6869 qs ?: Record < string , any > ;
6970} ;
7071
72+ export const OutputModelFactoryMethodsMode = {
73+ INLINE : 'inline' ,
74+ ISOLATED : 'isolated' ,
75+ } as const ;
76+
77+ export type NormalizedModelFactoryMethodsOptions = {
78+ factoryMethodPrefix ?: string ;
79+ outputMode ?: ( typeof OutputModelFactoryMethodsMode ) [ keyof typeof OutputModelFactoryMethodsMode ] ;
80+ } ;
81+
7182export type NormalizedOverrideOutput = {
7283 title ?: ( title : string ) => string ;
7384 transformer ?: OutputTransformer ;
@@ -81,6 +92,7 @@ export type NormalizedOverrideOutput = {
8192 formUrlEncoded : boolean | NormalizedMutator ;
8293 paramsSerializer ?: NormalizedMutator ;
8394 paramsSerializerOptions ?: NormalizedParamsSerializerOptions ;
95+ modelFactoryMethods ?: NormalizedModelFactoryMethodsOptions ;
8496 components : {
8597 schemas : {
8698 suffix : string ;
@@ -173,6 +185,7 @@ export type OutputOptions = {
173185 override ?: OverrideOutput ;
174186 client ?: OutputClient | OutputClientFunc ;
175187 httpClient ?: OutputHttpClient ;
188+ modelFactoryMethods ?: boolean ;
176189 clean ?: boolean | string [ ] ;
177190 prettier ?: boolean ;
178191 tslint ?: boolean ;
@@ -321,6 +334,11 @@ export type ParamsSerializerOptions = {
321334 qs ?: Record < string , any > ;
322335} ;
323336
337+ export type ModelFactoryMethodsOptions = {
338+ factoryMethodPrefix ?: string ;
339+ outputMode ?: ( typeof OutputModelFactoryMethodsMode ) [ keyof typeof OutputModelFactoryMethodsMode ] ;
340+ } ;
341+
324342export type OverrideOutput = {
325343 title ?: ( title : string ) => string ;
326344 transformer ?: OutputTransformer ;
@@ -334,6 +352,7 @@ export type OverrideOutput = {
334352 formUrlEncoded ?: boolean | Mutator ;
335353 paramsSerializer ?: Mutator ;
336354 paramsSerializerOptions ?: ParamsSerializerOptions ;
355+ modelFactoryMethods ?: ModelFactoryMethodsOptions ;
337356 components ?: {
338357 schemas ?: {
339358 suffix ?: string ;
@@ -596,6 +615,7 @@ export interface GlobalOptions {
596615 mock ?: boolean | GlobalMockOptions ;
597616 client ?: OutputClient ;
598617 httpClient ?: OutputHttpClient ;
618+ modelFactoryMethods ?: boolean ;
599619 mode ?: OutputMode ;
600620 tsconfig ?: string | Tsconfig ;
601621 packageJson ?: string ;
0 commit comments