@@ -355,7 +355,7 @@ extension {{projectName}}API {
355355 { {#isDeprecated} }
356356 @available(*, deprecated, message: "This operation is deprecated.")
357357 { {/isDeprecated} }
358- { {#nonPublicApi} }internal{ {/nonPublicApi} }{ {^nonPublicApi} }open{ {/nonPublicApi} } { {#apiStaticMethod} }class { {/apiStaticMethod} }func { {operationId} }Raw({ {#allParams} }{ {paramName} }: { {#isEnum} }{ {#isArray} }[{ {enumName} }_{ {operationId} }]{ {/isArray} }{ {^isArray} }{ {#isContainer} }{ {{dataType} }}{ {/isContainer} }{ {^isContainer} }{ {{datatypeWithEnum} }}_{ {operationId} }{ {/isContainer} }{ {/isArray} }{ {/isEnum} }{ {^isEnum} }{ {{dataType} }}{ {/isEnum} }{ {^required} }? = nil{ {/required} }{ {^-last} }, { {/-last} }{ {/allParams} }{ {#hasParams} }, { {/hasParams} }headers: HTTPHeaders = { {projectName } }APIConfiguration.shared.customHeaders , apiConfiguration: { {projectName} }APIConfiguration = { {projectName} }APIConfiguration.shared, beforeSend: (inout ClientRequest) throws -> () = { _ in } ) -> EventLoopFuture<ClientResponse > {
358+ { {#nonPublicApi} }internal{ {/nonPublicApi} }{ {^nonPublicApi} }open{ {/nonPublicApi} } { {#apiStaticMethod} }class { {/apiStaticMethod} }func { {operationId} }Raw({ {#allParams} }{ {paramName} }: { {#isEnum} }{ {#isArray} }[{ {enumName} }_{ {operationId} }]{ {/isArray} }{ {^isArray} }{ {#isContainer} }{ {{dataType} }}{ {/isContainer} }{ {^isContainer} }{ {{datatypeWithEnum} }}_{ {operationId} }{ {/isContainer} }{ {/isArray} }{ {/isEnum} }{ {^isEnum} }{ {{dataType} }}{ {/isEnum} }{ {^required} }? = nil{ {/required} }{ {^-last} }, { {/-last} }{ {/allParams} }{ {#hasParams} }, { {/hasParams} }headers: HTTPHeaders? = nil , apiConfiguration: { {projectName} }APIConfiguration = { {projectName} }APIConfiguration.shared, beforeSend: (inout ClientRequest) throws -> () = { _ in } ) -> EventLoopFuture<ClientResponse > {
359359 {{^pathParams} }let{ {/pathParams} }{ {#pathParams} }{ {#-first} }var{ {/-first} }{ {/pathParams} } localVariablePath = "{ {{path} }}"{ {#pathParams} }
360360 let { {paramName} }PreEscape = String(describing: { {#isEnum} }{ {paramName} }{ {#isContainer} }{ {{dataType} }}{ {/isContainer} }{ {^isContainer} }.rawValue{ {/isContainer} }{ {/isEnum} }{ {^isEnum} }{ {paramName} }{ {/isEnum} })
361361 let { {paramName} }PostEscape = { {paramName} }PreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
@@ -366,7 +366,7 @@ extension {{projectName}}API {
366366 fatalError(" apiConfiguration.apiClient is not set." )
367367 }
368368
369- return localVariableApiClient.send(.{ {httpMethod} }, headers: headers, to: URI(string: localVariableURLString)) { localVariableRequest in
369+ return localVariableApiClient.send(.{ {httpMethod} }, headers: headers ?? apiConfiguration.customHeaders , to: URI(string: localVariableURLString)) { localVariableRequest in
370370 try apiConfiguration.apiWrapper(&localVariableRequest)
371371 {{#hasHeaderParams} }{ {#headerParams} }
372372 localVariableRequest.headers.add(name: "{ {baseName} }", value: { {#isArray} }{ {paramName} }{ {^required} }?{ {/required} }.map { $0{{#isEnum} }.rawValue{ {/isEnum} }.description }.description{ {/isArray} }{ {^isArray} }{ {#isEnum} }{ {paramName} }{ {^required} }?{ {/required} }.rawValue.description{ {/isEnum} }{ {^isEnum} }{ {paramName} }{ {^required} }?{ {/required} }.description{ {/isEnum} }{ {/isArray} }{ {^required} } ?? ""{ {/required} })
@@ -435,7 +435,7 @@ extension {{projectName}}API {
435435 { {#isDeprecated} }
436436 @available(*, deprecated, message: "This operation is deprecated.")
437437 { {/isDeprecated} }
438- { {#nonPublicApi} }internal{ {/nonPublicApi} }{ {^nonPublicApi} }open{ {/nonPublicApi} } { {#apiStaticMethod} }class { {/apiStaticMethod} }func { {operationId} }({ {#allParams} }{ {paramName} }: { {#isEnum} }{ {#isArray} }[{ {enumName} }_{ {operationId} }]{ {/isArray} }{ {^isArray} }{ {#isContainer} }{ {{dataType} }}{ {/isContainer} }{ {^isContainer} }{ {{datatypeWithEnum} }}_{ {operationId} }{ {/isContainer} }{ {/isArray} }{ {/isEnum} }{ {^isEnum} }{ {{dataType} }}{ {/isEnum} }{ {^required} }? = nil{ {/required} }{ {^-last} }, { {/-last} }{ {/allParams} }{ {#hasParams} }, { {/hasParams} }headers: HTTPHeaders = { {projectName } }APIConfiguration.shared.customHeaders , apiConfiguration: { {projectName} }APIConfiguration = { {projectName} }APIConfiguration.shared, beforeSend: (inout ClientRequest) throws -> () = { _ in } ) -> EventLoopFuture<{ {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }> {
438+ { {#nonPublicApi} }internal{ {/nonPublicApi} }{ {^nonPublicApi} }open{ {/nonPublicApi} } { {#apiStaticMethod} }class { {/apiStaticMethod} }func { {operationId} }({ {#allParams} }{ {paramName} }: { {#isEnum} }{ {#isArray} }[{ {enumName} }_{ {operationId} }]{ {/isArray} }{ {^isArray} }{ {#isContainer} }{ {{dataType} }}{ {/isContainer} }{ {^isContainer} }{ {{datatypeWithEnum} }}_{ {operationId} }{ {/isContainer} }{ {/isArray} }{ {/isEnum} }{ {^isEnum} }{ {{dataType} }}{ {/isEnum} }{ {^required} }? = nil{ {/required} }{ {^-last} }, { {/-last} }{ {/allParams} }{ {#hasParams} }, { {/hasParams} }headers: HTTPHeaders? = nil , apiConfiguration: { {projectName} }APIConfiguration = { {projectName} }APIConfiguration.shared, beforeSend: (inout ClientRequest) throws -> () = { _ in } ) -> EventLoopFuture<{ {#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} }> {
439439 return {{operationId} }Raw({ {#allParams} }{ {paramName} }: { {paramName} }{ {^-last} }, { {/-last} }{ {/allParams} }{ {#hasParams} }, { {/hasParams} }headers: headers, apiConfiguration: apiConfiguration, beforeSend: beforeSend).flatMapThrowing { response -> {{#lambda.titlecase} }{ {operationId} }{ {/lambda.titlecase} } in
440440 switch response.status.code {
441441 {{#responses} }
0 commit comments