77namespace k8s;
88
99public partial class AbstractKubernetes : I{{name}}Operations
10- {
10+ {
1111 {{#apis}}
1212 /// <inheritdoc/>
1313 async Task<HttpOperationResponse{{GetReturnType operation "<>"}}> I{{name}}Operations.{{GetMethodName operation "WithHttpMessagesAsync"}}(
@@ -17,7 +17,7 @@ public partial class AbstractKubernetes : I{{name}}Operations
1717 IReadOnlyDictionary<string, IReadOnlyList<string>> customHeaders,
1818 CancellationToken cancellationToken)
1919 {
20- var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
20+ using var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
2121 cts.CancelAfter(HttpClientTimeout);
2222 {{#IfParamContains operation "watch"}}
2323 if (watch == true)
@@ -58,13 +58,13 @@ public partial class AbstractKubernetes : I{{name}}Operations
5858 {{#IfParamDoesNotContain operation "body"}}
5959 var httpResponse = await SendRequest<object>(url, HttpMethods.{{Method}}, customHeaders, null, cancellationToken);
6060 {{/IfParamDoesNotContain operation "body"}}
61- // Create Result
61+ // Create Result
6262 var httpRequest = httpResponse.RequestMessage;
6363 {{#IfReturnType operation "void"}}
6464 HttpOperationResponse result = new HttpOperationResponse() { Request = httpRequest, Response = httpResponse };
6565 {{/IfReturnType operation "void"}}
6666 {{#IfReturnType operation "obj"}}
67- var result = await CreateResultAsync{{GetReturnType operation "<>"}}(
67+ var result = await CreateResultAsync{{GetReturnType operation "<>"}}(
6868 httpRequest,
6969 httpResponse,
7070 {{#IfParamContains operation "watch"}}
0 commit comments