diff --git a/examples/csharp-generate-json-serializer/__snapshots__/index.spec.ts.snap b/examples/csharp-generate-json-serializer/__snapshots__/index.spec.ts.snap index 3ae391fac8..ba6cd1f148 100644 --- a/examples/csharp-generate-json-serializer/__snapshots__/index.spec.ts.snap +++ b/examples/csharp-generate-json-serializer/__snapshots__/index.spec.ts.snap @@ -65,7 +65,7 @@ internal class RootConverter : JsonConverter writer.WriteStartObject(); - if(value.Email != null) { + if(value.Email != null) { // write property name and let the serializer serialize the value itself writer.WritePropertyName(\\"email\\"); JsonSerializer.Serialize(writer, value.Email, options); diff --git a/src/generators/csharp/presets/JsonSerializerPreset.ts b/src/generators/csharp/presets/JsonSerializerPreset.ts index 9179fc28e5..82e6252c49 100644 --- a/src/generators/csharp/presets/JsonSerializerPreset.ts +++ b/src/generators/csharp/presets/JsonSerializerPreset.ts @@ -51,7 +51,7 @@ if (${modelInstanceVariable} != null) { } }`; } - serializeProperties += `if(${modelInstanceVariable} != null) { + serializeProperties += `if(${modelInstanceVariable} != null) { // write property name and let the serializer serialize the value itself writer.WritePropertyName("${propertyModel.unconstrainedPropertyName}"); ${renderSerializeProperty(modelInstanceVariable, propertyModel)} diff --git a/test/generators/csharp/presets/__snapshots__/JsonSerializerPreset.spec.ts.snap b/test/generators/csharp/presets/__snapshots__/JsonSerializerPreset.spec.ts.snap index ff361b1bf2..b5f12109a8 100644 --- a/test/generators/csharp/presets/__snapshots__/JsonSerializerPreset.spec.ts.snap +++ b/test/generators/csharp/presets/__snapshots__/JsonSerializerPreset.spec.ts.snap @@ -85,7 +85,7 @@ internal class TestConverter : JsonConverter } if (propertyName == \\"enumProp\\") { - var value = EnumTestExtension.ToEnumTest(JsonSerializer.Deserialize(ref reader, options)); + var value = EnumTestExtensions.ToEnumTest(JsonSerializer.Deserialize(ref reader, options)); instance.EnumProp = value; continue; }