Skip to content

Commit

Permalink
force event time to non-required (#1198)
Browse files Browse the repository at this point in the history
  • Loading branch information
tg123 authored Feb 11, 2023
1 parent 84da057 commit 208094d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/LibKubernetesGenerator/TypeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ private string GetDotNetType(JsonObjectType jsonType, string name, bool required
case "byte":
return "byte[]";
case "date-time":

// eventTime is required but should be optional, see https://github.com/kubernetes-client/csharp/issues/1197
if (name == "eventTime")
{
return "System.DateTime?";
}

if (required)
{
return "System.DateTime";
Expand Down

0 comments on commit 208094d

Please sign in to comment.