[csharp][generichost] fix date serialization indentation

Merged
DA
12d ago
+1102-1079

Summary

Align the braces and both serialization statements for default date and date-time fields in C# Generic Host model converters. The shared partial preserves required, optional, and nullable field handling. Explicit format extensions retain the existing writer.

The regenerated samples differ only in whitespace.

Verification

  • Built the generator CLI from the upstream master base with ./mvnw -B -pl modules/openapi-generator-cli -am package -DskipTests.
  • Regenerated all 51 Generic Host sample configurations using bin/generate-samples.sh and verified the sample diff with git diff -w.
  • Ran the .NET 8 Petstore model tests. All 385 passed.

cc @mandrean @shibayan @Blackclaws @lucamazzanti


Summary by cubic

Fixes misaligned braces and inconsistent indentation in C# Generic Host JSON model converters for date and date-time field serialization. The guarded property writing logic is now extracted into a shared WriteGuardedPropertyValue.mustache partial, so required, optional, and nullable fields produce correctly aligned output.

The regenerated samples differ only in whitespace, and all 385 .NET 8 Petstore model tests pass.