Version 17.0 + Generate 1.33 (#1626)

* generated based on 1.33

* Update version to 17.0 in version.json

* Remove extra API endpoint from swagger.json

* Remove ModelConverter and related AutoMapper components

* Update package versions

* Refactor code to use ConfigureAwait(false) for asynchronous calls and update target framework to net9.0

* Remove ConfigureAwait(false) from OidcAuthTests for consistency in async calls

* Update SDK version in README to reflect support for net8.0 and net9.0

* Update dotnet SDK version to 9.0.x in build workflow

* Revert Fractions package version to 7.3.0 in Directory.Packages.props

* Update target framework to netstandard2.1 for improved compatibility

* Update package references for Microsoft.CodeAnalysis in Directory.Packages.props and LibKubernetesGenerator.target

* Refactor Worker class constructor documentation and standardize Dictionary type declaration in Program.cs
This commit is contained in:
Boshi Lian
2025-04-27 12:55:24 -07:00
committed by GitHub
parent dfdf0b70d2
commit 001189de77
30 changed files with 10666 additions and 864 deletions

View File

@@ -26,6 +26,10 @@
<PackageReference Include="Xunit.StaFact" />
<PackageReference Include="Moq" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Net.Http" Condition="'$(TargetFramework)' == 'net48'" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\KubernetesClient.Classic\KubernetesClient.Classic.csproj" />

View File

@@ -1,47 +0,0 @@
using AutoMapper;
using FluentAssertions;
using k8s.ModelConverter.AutoMapper;
using k8s.Models;
using Xunit;
namespace k8s.Tests
{
public class AutoMapperVersionConverterTests
{
[Fact]
public void ConfigurationsAreValid()
{
var config = new MapperConfiguration(VersionConverter.GetConfigurations);
config.AssertConfigurationIsValid();
}
[Theory]
[InlineData("v1", "v1beta1", 1)]
[InlineData("v1beta1", "v1", -1)]
[InlineData("v1beta1", "v1alpha1", 1)]
[InlineData("v1alpha1", "v1beta1", -1)]
[InlineData("v1", "v1alpha1", 1)]
[InlineData("v2alpha1", "v1", 1)]
[InlineData("v1", "v2alpha1", -1)]
[InlineData("v1", "v1", 0)]
[InlineData("v2", "v2", 0)]
[InlineData("v1beta1", "v1beta1", 0)]
[InlineData("v1beta2", "v1beta2", 0)]
[InlineData("v2beta2", "v2beta2", 0)]
public void KubernetesVersionCompare(string x, string y, int expected)
{
KubernetesVersionComparer.Instance.Compare(x, y).Should().Be(expected);
}
[Fact]
public void ObjectMapAreValid()
{
ModelVersionConverter.Converter = AutoMapperModelVersionConverter.Instance;
var from = new V2HorizontalPodAutoscalerSpec(); // TODO shuold auto load all objects
from.MaxReplicas = 234;
var to = (V1HorizontalPodAutoscalerSpec)from;
Assert.Equal(from.MaxReplicas, to.MaxReplicas);
}
}
}

View File

@@ -33,6 +33,5 @@
<ItemGroup>
<ProjectReference Include="..\..\src\KubernetesClient\KubernetesClient.csproj" />
<ProjectReference Include="..\..\src\KubernetesClient.ModelConverter\KubernetesClient.ModelConverter.csproj" />
</ItemGroup>
</Project>