feat(KubernetesJson): Use of SourceGenerationContext outside AOT (#1677)

* feat: initial source gen for json

* wip

* chore: readd default settings

* chore: cleanup

* chore: remove source gen from classic as it depends on C#9 support

* Update KubernetesClient.Classic.csproj

* wip

* enable UseStringEnumConverter

* chore: make converters public so we can use them in our libraries

* fix: recursion and remove converter from source gen

* fix: V1StatusObjectViewConverter

* wip

* wip

* wip

* fix: rfc3339 json serialization and yaml de/serialization

* chore: add namespace

* fix: imports

* fix: switch output to RFC3339Micro to fit Time and MicroTime

* chore: update AOT to match KubernetesYaml

* fix aot

* Update buildtest.yaml
This commit is contained in:
Ivan Josipovic
2025-10-25 23:39:34 -07:00
committed by GitHub
parent 292262755a
commit 70b6386441
14 changed files with 402 additions and 135 deletions

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
@@ -43,7 +43,11 @@
<Compile Include="..\KubernetesClient\Models\V1Patch.cs" />
<Compile Include="..\KubernetesClient\Models\V1PodTemplateSpec.cs" />
<Compile Include="..\KubernetesClient\Models\V1Status.cs" />
<Compile Include="..\KubernetesClient\KubernetesJson.cs" />
<Compile Include="..\KubernetesClient\SourceGenerationContext.cs" />
<Compile Include="..\KubernetesClient\Models\V1Status.ObjectView.cs" />
<Compile Include="..\KubernetesClient\Models\KubernetesDateTimeOffsetYamlConverter.cs" />
<Compile Include="..\KubernetesClient\Models\KubernetesDateTimeYamlConverter.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\KubernetesClient\ClientSets\ClientSet.cs" />