Skip to content

Commit

Permalink
Update to fix validations
Browse files Browse the repository at this point in the history
  • Loading branch information
JFCote committed Aug 15, 2023
1 parent 42f2513 commit f20e12b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ internal class RootConverter : JsonConverter<Root>
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);
Expand Down
2 changes: 1 addition & 1 deletion src/generators/csharp/presets/JsonSerializerPreset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ internal class TestConverter : JsonConverter<Test>
}
if (propertyName == \\"enumProp\\")
{
var value = EnumTestExtension.ToEnumTest(JsonSerializer.Deserialize<dynamic>(ref reader, options));
var value = EnumTestExtensions.ToEnumTest(JsonSerializer.Deserialize<dynamic>(ref reader, options));
instance.EnumProp = value;
continue;
}
Expand Down

0 comments on commit f20e12b

Please sign in to comment.