diff --git a/samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/ClientUtils.cs
index f14c41cebb1..a312a586bfa 100644
--- a/samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/ClientUtils.cs
+++ b/samples/client/petstore/csharp/generichost/latest/Tags/src/Org.OpenAPITools/Client/ClientUtils.cs
@@ -142,6 +142,8 @@ namespace Org.OpenAPITools.Client
// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
// For example: 2009-06-15T13:45:30.0000000
return dateTimeOffset.ToString(format);
+ if (obj is DateOnly dateOnly)
+ return dateOnly.ToString(format);
if (obj is bool boolean)
return boolean
? "true"
diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/NullableClass.md b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/NullableClass.md
index 67c1052fca9..2d238d6a80c 100644
--- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/NullableClass.md
+++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/NullableClass.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**NumberProp** | **decimal?** | | [optional]
**BooleanProp** | **bool?** | | [optional]
**StringProp** | **string** | | [optional]
-**DateProp** | **DateOnly** | | [optional]
+**DateProp** | **DateOnly?** | | [optional]
**DatetimeProp** | **DateTime?** | | [optional]
**ArrayNullableProp** | **List<Object>** | | [optional]
**ArrayAndItemsNullableProp** | **List<Object>** | | [optional]
diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/RequiredClass.md b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/RequiredClass.md
index 685c1c51e03..7f734db8a61 100644
--- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/RequiredClass.md
+++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/docs/RequiredClass.md
@@ -16,9 +16,9 @@ Name | Type | Description | Notes
**RequiredNotnullableBooleanProp** | **bool** | |
**NotrequiredNullableBooleanProp** | **bool?** | | [optional]
**NotrequiredNotnullableBooleanProp** | **bool** | | [optional]
-**RequiredNullableDateProp** | **DateOnly** | |
+**RequiredNullableDateProp** | **DateOnly?** | |
**RequiredNotNullableDateProp** | **DateOnly** | |
-**NotRequiredNullableDateProp** | **DateOnly** | | [optional]
+**NotRequiredNullableDateProp** | **DateOnly?** | | [optional]
**NotRequiredNotnullableDateProp** | **DateOnly** | | [optional]
**RequiredNotnullableDatetimeProp** | **DateTime** | |
**RequiredNullableDatetimeProp** | **DateTime?** | |
diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs
index be49efc7f71..59c8975b929 100644
--- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs
+++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/FormatTest.cs
@@ -71,11 +71,6 @@ namespace Org.OpenAPITools.Model
throw new ArgumentNullException("varByte is a required property for FormatTest and cannot be null");
}
this.Byte = varByte;
- // to ensure "date" is required (not null)
- if (date == null)
- {
- throw new ArgumentNullException("date is a required property for FormatTest and cannot be null");
- }
this.Date = date;
// to ensure "password" is required (not null)
if (password == null)
diff --git a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableClass.cs
index 1ae27f1846d..c8fda56e430 100644
--- a/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableClass.cs
+++ b/samples/client/petstore/csharp/restsharp/net7/EnumMappings/src/Org.OpenAPITools/Model/NullableClass.cs
@@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Model
/// objectNullableProp.
/// objectAndItemsNullableProp.
/// objectItemsNullable.
- public NullableClass(int? integerProp = default(int?), decimal? numberProp = default(decimal?), bool? booleanProp = default(bool?), string stringProp = default(string), DateOnly dateProp = default(DateOnly), DateTime? datetimeProp = default(DateTime?), List