Skip to content

Commit 208094d

Browse files
authored
force event time to non-required (#1198)
1 parent 84da057 commit 208094d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: src/LibKubernetesGenerator/TypeHelper.cs

+7
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ private string GetDotNetType(JsonObjectType jsonType, string name, bool required
129129
case "byte":
130130
return "byte[]";
131131
case "date-time":
132+
133+
// eventTime is required but should be optional, see https://github.com/kubernetes-client/csharp/issues/1197
134+
if (name == "eventTime")
135+
{
136+
return "System.DateTime?";
137+
}
138+
132139
if (required)
133140
{
134141
return "System.DateTime";

0 commit comments

Comments
 (0)