Skip to content

Commit 9ac1f9c

Browse files
committed
fix: correct usage of Pod list items in client example and update Obsolete attribute formatting
1 parent 942a645 commit 9ac1f9c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/clientset/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using k8s;
1+
using k8s;
22
using k8s.ClientSets;
33
using System.Threading.Tasks;
44

@@ -13,7 +13,7 @@ private static async Task Main(string[] args)
1313

1414
var clientSet = new ClientSet(client);
1515
var list = await clientSet.CoreV1.Pod.ListAsync("default").ConfigureAwait(false);
16-
foreach (var item in list)
16+
foreach (var item in list.Items)
1717
{
1818
System.Console.WriteLine(item.Metadata.Name);
1919
}

src/LibKubernetesGenerator/templates/IOperations.cs.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public partial interface I{{name}}Operations
2626
/// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation.
2727
/// </param>
2828
{{if IfParamContains api.operation "watch"}}
29-
[Obsolete("This method will be deprecated in future versions. Please use the Watch method instead.", false)]
30-
{{end}}
29+
[Obsolete("This method will be deprecated in future versions. Please use the Watch method instead.")]
30+
{{ end }}
3131
Task<HttpOperationResponse{{GetReturnType api.operation "<>"}}> {{GetOperationId api.operation "WithHttpMessagesAsync"}}(
3232
{{ for parameter in api.operation.parameters}}
3333
{{GetDotNetTypeOpenApiParameter parameter}} {{GetDotNetNameOpenApiParameter parameter "true"}},

0 commit comments

Comments
 (0)