Skip to content

Commit ed207b0

Browse files
Fix generation
1 parent 3635d7a commit ed207b0

File tree

4 files changed

+211
-210
lines changed

4 files changed

+211
-210
lines changed

RestClient.Net.OpenApiGenerator/ExtensionMethodGenerator.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ string summary
294294
var deserializeMethod = isDelete ? "_deserializeUnit" : deserializer;
295295

296296
var privateDelegate = $$"""
297-
private static {{delegateType}}<{{resultResponseType}}, string, {{bodyType}}> {{privateFunctionName}}() =>
297+
private static {{delegateType}}<{{resultResponseType}}, string, {{bodyType}}> {{privateFunctionName}} =
298298
RestClient.Net.HttpClientFactoryExtensions.{{createMethod}}<{{resultResponseType}}, string, {{bodyType}}>(
299299
url: BaseUrl,
300300
buildRequest: static body => new HttpRequestParts(new RelativeUrl("{{path}}"), CreateJsonContent(body), null),
@@ -309,7 +309,7 @@ string summary
309309
this HttpClient httpClient,
310310
{{bodyType}} body,
311311
CancellationToken ct = default
312-
) => {{privateFunctionName}}()(httpClient, body, ct);
312+
) => {{privateFunctionName}}(httpClient, body, ct);
313313
""";
314314

315315
return (publicMethod, privateDelegate);
@@ -335,7 +335,7 @@ string summary
335335
);
336336

337337
var privateDelegate = $$"""
338-
private static {{delegateType}}<{{resultResponseType}}, string, {{queryParamsType}}> {{privateFunctionName}}() =>
338+
private static {{delegateType}}<{{resultResponseType}}, string, {{queryParamsType}}> {{privateFunctionName}} =>
339339
RestClient.Net.HttpClientFactoryExtensions.{{createMethod}}<{{resultResponseType}}, string, {{queryParamsType}}>(
340340
url: BaseUrl,
341341
buildRequest: static param => new HttpRequestParts(new RelativeUrl($"{{path}}{{queryStringWithParam}}"), null, null),
@@ -350,7 +350,7 @@ string summary
350350
this HttpClient httpClient,
351351
{{string.Join(", ", queryParams.Select(q => $"{q.Type} {q.Name}"))}},
352352
CancellationToken ct = default
353-
) => {{privateFunctionName}}()(httpClient, {{paramInvocation}}, ct);
353+
) => {{privateFunctionName}}(httpClient, {{paramInvocation}}, ct);
354354
""";
355355

356356
return (publicMethod, privateDelegate);
@@ -433,7 +433,7 @@ string summary
433433
: sanitizedPath.Replace("{", "{param.", StringComparison.Ordinal);
434434

435435
var privateDelegate = $$"""
436-
private static {{delegateType}}<{{resultResponseType}}, string, {{pathParamsType}}> {{privateFunctionName}}() =>
436+
private static {{delegateType}}<{{resultResponseType}}, string, {{pathParamsType}}> {{privateFunctionName}} =>
437437
RestClient.Net.HttpClientFactoryExtensions.{{createMethod}}<{{resultResponseType}}, string, {{pathParamsType}}>(
438438
url: BaseUrl,
439439
buildRequest: static {{lambda}} => new HttpRequestParts(new RelativeUrl($"{{pathWithParam}}"), null, null),
@@ -448,7 +448,7 @@ string summary
448448
this HttpClient httpClient,
449449
{{publicMethodParams}},
450450
CancellationToken ct = default
451-
) => {{privateFunctionName}}()(httpClient, {{publicMethodInvocation}}, ct);
451+
) => {{privateFunctionName}}(httpClient, {{publicMethodInvocation}}, ct);
452452
""";
453453

454454
return (publicMethod, privateDelegate);
@@ -469,7 +469,7 @@ string summary
469469
: sanitizedPath.Replace("{", "{param.Params.", StringComparison.Ordinal);
470470

471471
var privateDelegate = $$"""
472-
private static {{delegateType}}<{{resultResponseType}}, string, {{compositeType}}> {{privateFunctionName}}() =>
472+
private static {{delegateType}}<{{resultResponseType}}, string, {{compositeType}}> {{privateFunctionName}} =>
473473
RestClient.Net.HttpClientFactoryExtensions.{{createMethod}}<{{resultResponseType}}, string, {{compositeType}}>(
474474
url: BaseUrl,
475475
buildRequest: static param => new HttpRequestParts(new RelativeUrl($"{{pathWithParamInterpolation}}"), CreateJsonContent(param.Body), null),
@@ -484,7 +484,7 @@ string summary
484484
this HttpClient httpClient,
485485
{{compositeType}} param,
486486
CancellationToken ct = default
487-
) => {{privateFunctionName}}()(httpClient, param, ct);
487+
) => {{privateFunctionName}}(httpClient, param, ct);
488488
""";
489489

490490
return (publicMethod, privateDelegate);

0 commit comments

Comments
 (0)