@@ -234,60 +234,60 @@ namespace {{packageName}}.{{apiPackage}}
234
234
{ {/required} }
235
235
{ {/isNullable} }
236
236
{ {/allParams} }
237
- { {packageName} }.Client.RequestOptions requestOptions = new { {packageName} }.Client.RequestOptions();
237
+ { {packageName} }.Client.RequestOptions localVarRequestOptions = new { {packageName} }.Client.RequestOptions();
238
238
239
- String[] @contentTypes = new String[] {
239
+ String[] _contentTypes = new String[] {
240
240
{{#consumes} }
241
241
"{ {{mediaType} }}"{ {#hasMore} }, { {/hasMore} }
242
242
{ {/consumes} }
243
243
};
244
244
245
245
// to determine the Accept header
246
- String[] @accepts = new String[] {
246
+ String[] _accepts = new String[] {
247
247
{{#produces} }
248
248
"{ {{mediaType} }}"{ {#hasMore} },{ {/hasMore} }
249
249
{ {/produces} }
250
250
};
251
251
252
- var localVarContentType = { {packageName} }.Client.ClientUtils.SelectHeaderContentType(@contentTypes );
253
- if (localVarContentType != null) requestOptions .HeaderParameters.Add("Content-Type", localVarContentType);
252
+ var localVarContentType = { {packageName} }.Client.ClientUtils.SelectHeaderContentType(_contentTypes );
253
+ if (localVarContentType != null) localVarRequestOptions .HeaderParameters.Add("Content-Type", localVarContentType);
254
254
255
- var localVarAccept = { {packageName} }.Client.ClientUtils.SelectHeaderAccept(@accepts );
256
- if (localVarAccept != null) requestOptions .HeaderParameters.Add("Accept", localVarAccept);
255
+ var localVarAccept = { {packageName} }.Client.ClientUtils.SelectHeaderAccept(_accepts );
256
+ if (localVarAccept != null) localVarRequestOptions .HeaderParameters.Add("Accept", localVarAccept);
257
257
258
258
{ {#pathParams} }
259
259
if ({ {paramName} } != null)
260
- requestOptions .PathParameters.Add("{ {baseName} }", { {packageName} }.Client.ClientUtils.ParameterToString({ {paramName} })); // path parameter
260
+ localVarRequestOptions .PathParameters.Add("{ {baseName} }", { {packageName} }.Client.ClientUtils.ParameterToString({ {paramName} })); // path parameter
261
261
{ {/pathParams} }
262
262
{ {#queryParams} }
263
263
if ({ {paramName} } != null)
264
264
{
265
- foreach (var kvp in {{packageName} }.Client.ClientUtils.ParameterToMultiMap("{ {#collectionFormat} }{ {collectionFormat} }{ {/collectionFormat} }", "{ {baseName} }", { {paramName} }))
265
+ foreach (var _kvp in {{packageName} }.Client.ClientUtils.ParameterToMultiMap("{ {#collectionFormat} }{ {collectionFormat} }{ {/collectionFormat} }", "{ {baseName} }", { {paramName} }))
266
266
{
267
- foreach (var kvpValue in kvp .Value)
267
+ foreach (var _kvpValue in _kvp .Value)
268
268
{
269
- requestOptions .QueryParameters.Add(kvp .Key, kvpValue );
269
+ localVarRequestOptions .QueryParameters.Add(_kvp .Key, _kvpValue );
270
270
}
271
271
}
272
272
}
273
273
{ {/queryParams} }
274
274
{ {#headerParams} }
275
275
if ({ {paramName} } != null)
276
- requestOptions .HeaderParameters.Add("{ {baseName} }", { {packageName} }.Client.ClientUtils.ParameterToString({ {paramName} })); // header parameter
276
+ localVarRequestOptions .HeaderParameters.Add("{ {baseName} }", { {packageName} }.Client.ClientUtils.ParameterToString({ {paramName} })); // header parameter
277
277
{ {/headerParams} }
278
278
{ {#formParams} }
279
279
if ({ {paramName} } != null)
280
280
{
281
281
{{#isFile} }
282
- requestOptions .FileParameters.Add("{ {baseName} }", { {paramName} });
282
+ localVarRequestOptions .FileParameters.Add("{ {baseName} }", { {paramName} });
283
283
{ {/isFile} }
284
284
{ {^isFile} }
285
- requestOptions .FormParameters.Add("{ {baseName} }", { {packageName} }.Client.ClientUtils.ParameterToString({ {paramName} })); // form parameter
285
+ localVarRequestOptions .FormParameters.Add("{ {baseName} }", { {packageName} }.Client.ClientUtils.ParameterToString({ {paramName} })); // form parameter
286
286
{ {/isFile} }
287
287
}
288
288
{ {/formParams} }
289
289
{ {#bodyParam} }
290
- requestOptions .Data = { {paramName} };
290
+ localVarRequestOptions .Data = { {paramName} };
291
291
{ {/bodyParam} }
292
292
293
293
{ {#authMethods} }
@@ -296,17 +296,17 @@ namespace {{packageName}}.{{apiPackage}}
296
296
{ {#isKeyInHeader} }
297
297
if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{ {keyParamName} }")))
298
298
{
299
- requestOptions .HeaderParameters.Add(" {{keyParamName}}" , this.Configuration.GetApiKeyWithPrefix(" {{keyParamName}}" ));
299
+ localVarRequestOptions .HeaderParameters.Add(" {{keyParamName}}" , this.Configuration.GetApiKeyWithPrefix(" {{keyParamName}}" ));
300
300
}
301
301
{ {/isKeyInHeader} }
302
302
{ {#isKeyInQuery} }
303
303
if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{ {keyParamName} }")))
304
304
{
305
- foreach (var kvp in {{packageName} }.Client.ClientUtils.ParameterToMultiMap("", "{ {keyParamName} }", this.Configuration.GetApiKeyWithPrefix("{ {keyParamName} }")))
305
+ foreach (var _kvp in {{packageName} }.Client.ClientUtils.ParameterToMultiMap("", "{ {keyParamName} }", this.Configuration.GetApiKeyWithPrefix("{ {keyParamName} }")))
306
306
{
307
- foreach (var kvpValue in kvp .Value)
307
+ foreach (var _kvpValue in _kvp .Value)
308
308
{
309
- requestOptions .QueryParameters.Add(kvp .Key, kvpValue );
309
+ localVarRequestOptions .QueryParameters.Add(_kvp .Key, _kvpValue );
310
310
}
311
311
}
312
312
}
@@ -316,29 +316,28 @@ namespace {{packageName}}.{{apiPackage}}
316
316
// http basic authentication required
317
317
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
318
318
{
319
- requestOptions .HeaderParameters.Add(" Authorization" , " Basic " + {{packageName} }.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
319
+ localVarRequestOptions .HeaderParameters.Add(" Authorization" , " Basic " + {{packageName} }.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
320
320
}
321
321
{ {/isBasic} }
322
322
{ {#isOAuth} }
323
323
// oauth required
324
324
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
325
325
{
326
- requestOptions .HeaderParameters.Add(" Authorization" , " Bearer " + this.Configuration.AccessToken);
326
+ localVarRequestOptions .HeaderParameters.Add(" Authorization" , " Bearer " + this.Configuration.AccessToken);
327
327
}
328
328
{ {/isOAuth} }
329
329
{ {/authMethods} }
330
330
331
331
// make the HTTP request
332
-
333
- var response = this.Client.{ {#lambda.titlecase} }{ {#lambda.lowercase} }{ {httpMethod} }{ {/lambda.lowercase} }{ {/lambda.titlecase} }<{ {#returnType} } { {{returnType} }} { {/returnType} }{ {^returnType} }Object{ {/returnType} }>("{ {{path} }}", requestOptions, this.Configuration);
332
+ var localVarResponse = this.Client.{ {#lambda.titlecase} }{ {#lambda.lowercase} }{ {httpMethod} }{ {/lambda.lowercase} }{ {/lambda.titlecase} }<{ {#returnType} } { {{returnType} }} { {/returnType} }{ {^returnType} }Object{ {/returnType} }>("{ {{path} }}", localVarRequestOptions, this.Configuration);
334
333
335
334
if (this.ExceptionFactory != null)
336
335
{
337
- Exception exception = this.ExceptionFactory(" {{operationId}}" , response );
338
- if (exception != null) throw exception ;
336
+ Exception _exception = this.ExceptionFactory(" {{operationId}}" , localVarResponse );
337
+ if (_exception != null) throw _exception ;
339
338
}
340
339
341
- return response ;
340
+ return localVarResponse ;
342
341
}
343
342
344
343
{ {#supportsAsync} }
@@ -374,60 +373,60 @@ namespace {{packageName}}.{{apiPackage}}
374
373
{ {/isNullable} }
375
374
{ {/allParams} }
376
375
377
- { {packageName} }.Client.RequestOptions requestOptions = new { {packageName} }.Client.RequestOptions();
376
+ { {packageName} }.Client.RequestOptions localVarRequestOptions = new { {packageName} }.Client.RequestOptions();
378
377
379
- String[] @contentTypes = new String[] {
378
+ String[] _contentTypes = new String[] {
380
379
{{#consumes} }
381
380
"{ {{mediaType} }}"{ {#hasMore} }, { {/hasMore} }
382
381
{ {/consumes} }
383
382
};
384
383
385
384
// to determine the Accept header
386
- String[] @accepts = new String[] {
385
+ String[] _accepts = new String[] {
387
386
{{#produces} }
388
387
"{ {{mediaType} }}"{ {#hasMore} },{ {/hasMore} }
389
388
{ {/produces} }
390
389
};
391
390
392
- foreach (var contentType in @contentTypes )
393
- requestOptions .HeaderParameters.Add("Content-Type", contentType );
391
+ foreach (var _contentType in _contentTypes )
392
+ localVarRequestOptions .HeaderParameters.Add("Content-Type", _contentType );
394
393
395
- foreach (var accept in @accepts )
396
- requestOptions .HeaderParameters.Add("Accept", accept );
394
+ foreach (var _accept in _accepts )
395
+ localVarRequestOptions .HeaderParameters.Add("Accept", _accept );
397
396
398
397
{ {#pathParams} }
399
398
if ({ {paramName} } != null)
400
- requestOptions .PathParameters.Add("{ {baseName} }", { {packageName} }.Client.ClientUtils.ParameterToString({ {paramName} })); // path parameter
399
+ localVarRequestOptions .PathParameters.Add("{ {baseName} }", { {packageName} }.Client.ClientUtils.ParameterToString({ {paramName} })); // path parameter
401
400
{ {/pathParams} }
402
401
{ {#queryParams} }
403
402
if ({ {paramName} } != null)
404
403
{
405
- foreach (var kvp in {{packageName} }.Client.ClientUtils.ParameterToMultiMap("{ {#collectionFormat} }{ {collectionFormat} }{ {/collectionFormat} }", "{ {baseName} }", { {paramName} }))
404
+ foreach (var _kvp in {{packageName} }.Client.ClientUtils.ParameterToMultiMap("{ {#collectionFormat} }{ {collectionFormat} }{ {/collectionFormat} }", "{ {baseName} }", { {paramName} }))
406
405
{
407
- foreach (var kvpValue in kvp .Value)
406
+ foreach (var _kvpValue in _kvp .Value)
408
407
{
409
- requestOptions .QueryParameters.Add(kvp .Key, kvpValue );
408
+ localVarRequestOptions .QueryParameters.Add(_kvp .Key, _kvpValue );
410
409
}
411
410
}
412
411
}
413
412
{ {/queryParams} }
414
413
{ {#headerParams} }
415
414
if ({ {paramName} } != null)
416
- requestOptions .HeaderParameters.Add("{ {baseName} }", { {packageName} }.Client.ClientUtils.ParameterToString({ {paramName} })); // header parameter
415
+ localVarRequestOptions .HeaderParameters.Add("{ {baseName} }", { {packageName} }.Client.ClientUtils.ParameterToString({ {paramName} })); // header parameter
417
416
{ {/headerParams} }
418
417
{ {#formParams} }
419
418
if ({ {paramName} } != null)
420
419
{
421
420
{{#isFile} }
422
- requestOptions .FileParameters.Add("{ {baseName} }", { {paramName} });
421
+ localVarRequestOptions .FileParameters.Add("{ {baseName} }", { {paramName} });
423
422
{ {/isFile} }
424
423
{ {^isFile} }
425
- requestOptions .FormParameters.Add("{ {baseName} }", { {packageName} }.Client.ClientUtils.ParameterToString({ {paramName} })); // form parameter
424
+ localVarRequestOptions .FormParameters.Add("{ {baseName} }", { {packageName} }.Client.ClientUtils.ParameterToString({ {paramName} })); // form parameter
426
425
{ {/isFile} }
427
426
}
428
427
{ {/formParams} }
429
428
{ {#bodyParam} }
430
- requestOptions .Data = { {paramName} };
429
+ localVarRequestOptions .Data = { {paramName} };
431
430
{ {/bodyParam} }
432
431
433
432
{ {#authMethods} }
@@ -436,17 +435,17 @@ namespace {{packageName}}.{{apiPackage}}
436
435
{ {#isKeyInHeader} }
437
436
if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{ {keyParamName} }")))
438
437
{
439
- requestOptions .HeaderParameters.Add(" {{keyParamName}}" , this.Configuration.GetApiKeyWithPrefix(" {{keyParamName}}" ));
438
+ localVarRequestOptions .HeaderParameters.Add(" {{keyParamName}}" , this.Configuration.GetApiKeyWithPrefix(" {{keyParamName}}" ));
440
439
}
441
440
{ {/isKeyInHeader} }
442
441
{ {#isKeyInQuery} }
443
442
if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{ {keyParamName} }")))
444
443
{
445
- foreach (var kvp in {{packageName} }.Client.ClientUtils.ParameterToMultiMap("", "{ {keyParamName} }", this.Configuration.GetApiKeyWithPrefix("{ {keyParamName} }")))
444
+ foreach (var _kvp in {{packageName} }.Client.ClientUtils.ParameterToMultiMap("", "{ {keyParamName} }", this.Configuration.GetApiKeyWithPrefix("{ {keyParamName} }")))
446
445
{
447
- foreach (var kvpValue in kvp .Value)
446
+ foreach (var _kvpValue in _kvp .Value)
448
447
{
449
- requestOptions .QueryParameters.Add(kvp .Key, kvpValue );
448
+ localVarRequestOptions .QueryParameters.Add(_kvp .Key, _kvpValue );
450
449
}
451
450
}
452
451
}
@@ -456,29 +455,29 @@ namespace {{packageName}}.{{apiPackage}}
456
455
// http basic authentication required
457
456
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
458
457
{
459
- requestOptions .HeaderParameters.Add(" Authorization" , " Basic " + {{packageName} }.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
458
+ localVarRequestOptions .HeaderParameters.Add(" Authorization" , " Basic " + {{packageName} }.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password));
460
459
}
461
460
{ {/isBasic} }
462
461
{ {#isOAuth} }
463
462
// oauth required
464
463
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
465
464
{
466
- requestOptions .HeaderParameters.Add(" Authorization" , " Bearer " + this.Configuration.AccessToken);
465
+ localVarRequestOptions .HeaderParameters.Add(" Authorization" , " Bearer " + this.Configuration.AccessToken);
467
466
}
468
467
{ {/isOAuth} }
469
468
{ {/authMethods} }
470
469
471
470
// make the HTTP request
472
471
473
- var response = await this.AsynchronousClient.{ {#lambda.titlecase} }{ {#lambda.lowercase} }{ {httpMethod} }{ {/lambda.lowercase} }{ {/lambda.titlecase} }Async<{ {#returnType} }{ {{returnType} }}{ {/returnType} }{ {^returnType} }Object{ {/returnType} }>("{ {{path} }}", requestOptions , this.Configuration);
472
+ var localVarResponse = await this.AsynchronousClient.{ {#lambda.titlecase} }{ {#lambda.lowercase} }{ {httpMethod} }{ {/lambda.lowercase} }{ {/lambda.titlecase} }Async<{ {#returnType} }{ {{returnType} }}{ {/returnType} }{ {^returnType} }Object{ {/returnType} }>("{ {{path} }}", localVarRequestOptions , this.Configuration);
474
473
475
474
if (this.ExceptionFactory != null)
476
475
{
477
- Exception exception = this.ExceptionFactory(" {{operationId}}" , response );
478
- if (exception != null) throw exception ;
476
+ Exception _exception = this.ExceptionFactory(" {{operationId}}" , localVarResponse );
477
+ if (_exception != null) throw _exception ;
479
478
}
480
479
481
- return response ;
480
+ return localVarResponse ;
482
481
}
483
482
484
483
{ {/supportsAsync} }
0 commit comments