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:
Boshi Lian
2021-12-13 07:31:59 -08:00
committed by GitHub
parent 6c539873b5
commit eca9898902
699 changed files with 65366 additions and 128699 deletions

View File

@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
@@ -487,7 +483,7 @@ namespace k8s
var process = new Process();
process.StartInfo.EnvironmentVariables.Add("KUBERNETES_EXEC_INFO", JsonConvert.SerializeObject(execInfo));
process.StartInfo.EnvironmentVariables.Add("KUBERNETES_EXEC_INFO", JsonSerializer.Serialize(execInfo));
if (config.EnvironmentVariables != null)
{
foreach (var configEnvironmentVariable in config.EnvironmentVariables)
@@ -559,7 +555,7 @@ namespace k8s
try
{
var responseObject = JsonConvert.DeserializeObject<ExecCredentialResponse>(stdout);
var responseObject = KubernetesJson.Deserialize<ExecCredentialResponse>(stdout);
if (responseObject == null || responseObject.ApiVersion != config.ApiVersion)
{
throw new KubeConfigException(
@@ -584,7 +580,7 @@ namespace k8s
throw new KubeConfigException($"external exec failed missing token or clientCertificateData field in plugin output");
}
}
catch (JsonSerializationException ex)
catch (JsonException ex)
{
throw new KubeConfigException($"external exec failed due to failed deserialization process: {ex}");
}