API v1.23.0 + system.text.json + remove WatchXXX API (#750)
* gen v1.23.0 * fix converter * bump ver * update readme runtime * fix warning * update dep ver * newtonjson -> system.text.json * generate for new json api * readme lf * dotnet fmt * dotnet fmt tests/ * dotnet fmt * Revert "dotnet fmt" This reverts commit e14c59076143fe2218ed899295a00762f0ea2bd6. * fix err introduce by dotnet fmt * fix test * remove deprecated /watch api * generate code after /watch removed * remove /watch related code * trim Microsoft.Rest.Serialization
This commit is contained in:
@@ -1,13 +1,8 @@
|
||||
using k8s.Models;
|
||||
using Microsoft.Rest;
|
||||
using Microsoft.Rest.Serialization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.WebSockets;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -371,12 +366,12 @@ namespace k8s
|
||||
var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
#endif
|
||||
// Try to parse the content as a V1Status object
|
||||
var genericObject = SafeJsonConvert.DeserializeObject<KubernetesObject>(content);
|
||||
var genericObject = KubernetesJson.Deserialize<KubernetesObject>(content);
|
||||
V1Status status = null;
|
||||
|
||||
if (genericObject.ApiVersion == "v1" && genericObject.Kind == "Status")
|
||||
{
|
||||
status = SafeJsonConvert.DeserializeObject<V1Status>(content);
|
||||
status = KubernetesJson.Deserialize<V1Status>(content);
|
||||
}
|
||||
|
||||
var ex =
|
||||
|
||||
Reference in New Issue
Block a user