revert change to structs from classes for IntOrString and ResourceQuantity, and handle null values in YAML converters (#1673)

* feat: add V2HorizontalPodAutoscaler integration test

* fix: change structs to classes for IntOrString and ResourceQuantity, and handle null values in YAML converters

* feat: implement equality members for ResourceQuantity class
This commit is contained in:
Boshi Lian
2025-10-15 08:59:35 -07:00
committed by GitHub
parent 6d27bd900b
commit 292262755a
5 changed files with 211 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ namespace k8s.Models
public void WriteYaml(IEmitter emitter, object value, Type type, ObjectSerializer serializer)
{
var obj = (ResourceQuantity)value;
emitter?.Emit(new YamlDotNet.Core.Events.Scalar(obj.ToString()));
emitter?.Emit(new YamlDotNet.Core.Events.Scalar(obj?.ToString()));
}
}
}