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 {
151151 typePrefix ?: string ;
152152 /** suffix string value for type names */
153153 typeSuffix ?: string ;
154+ /** extra configuration for extracting type names operations */
154155 extractingOptions ?: Partial < ExtractingOptions > ;
156+ /** configuration for fetching swagger schema requests */
157+ requestOptions ?: null | Partial < import ( "node-fetch" ) . RequestInit > ;
155158}
156159
157160type CodeGenConstruct = {
@@ -529,6 +532,7 @@ export interface GenerateApiConfiguration {
529532 routes : ParsedRoute [ ] ;
530533 } [ ] ;
531534 } ;
535+ requestOptions ?: null | Partial < import ( "node-fetch" ) . RequestInit > ;
532536 utils : {
533537 formatDescription : ( description : string , inline ?: boolean ) => string ;
534538 internalCase : ( value : string ) => string ;
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class Request {
3535 } ;
3636
3737 if ( disableStrictSSL ) {
38- const { Agent } = _ . startsWith ( url , "http://" ) ? http : https ;
38+ const Agent = _ . startsWith ( url , "http://" ) ? http . Agent . bind ( http ) : https . Agent . bind ( https ) ;
3939 requestOptions . agent = new Agent ( {
4040 rejectUnauthorized : false ,
4141 } ) ;
You can’t perform that action at this time.
0 commit comments