File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,10 @@ interface GenerateApiParamsBase {
151
151
typePrefix ?: string ;
152
152
/** suffix string value for type names */
153
153
typeSuffix ?: string ;
154
+ /** extra configuration for extracting type names operations */
154
155
extractingOptions ?: Partial < ExtractingOptions > ;
156
+ /** configuration for fetching swagger schema requests */
157
+ requestOptions ?: null | Partial < import ( "node-fetch" ) . RequestInit > ;
155
158
}
156
159
157
160
type CodeGenConstruct = {
@@ -529,6 +532,7 @@ export interface GenerateApiConfiguration {
529
532
routes : ParsedRoute [ ] ;
530
533
} [ ] ;
531
534
} ;
535
+ requestOptions ?: null | Partial < import ( "node-fetch" ) . RequestInit > ;
532
536
utils : {
533
537
formatDescription : ( description : string , inline ?: boolean ) => string ;
534
538
internalCase : ( value : string ) => string ;
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class Request {
35
35
} ;
36
36
37
37
if ( disableStrictSSL ) {
38
- const { Agent } = _ . startsWith ( url , "http://" ) ? http : https ;
38
+ const Agent = _ . startsWith ( url , "http://" ) ? http . Agent . bind ( http ) : https . Agent . bind ( https ) ;
39
39
requestOptions . agent = new Agent ( {
40
40
rejectUnauthorized : false ,
41
41
} ) ;
You can’t perform that action at this time.
0 commit comments