Skip to content

Commit

Permalink
fix(YamlDotNet): Fixed the YamlSerializer to not configure a naming c…
Browse files Browse the repository at this point in the history
…onvention
  • Loading branch information
cdavernas committed Aug 26, 2024
1 parent 1083022 commit 1c793f9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ public class YamlSerializer(YamlDotNet.Serialization.ISerializer serializer, IDe
serializer
.ConfigureDefaultValuesHandling(DefaultValuesHandling.OmitNull | DefaultValuesHandling.OmitDefaults | DefaultValuesHandling.OmitEmptyCollections)
.WithQuotingNecessaryStrings(true)
.WithNamingConvention(CamelCaseNamingConvention.Instance)
//.WithNamingConvention(CamelCaseNamingConvention.Instance)
.WithTypeConverter(new JsonNodeTypeConverter())
.WithTypeConverter(new JsonSchemaTypeConverter())
.WithTypeConverter(new StringEnumSerializer())
.WithTypeConverter(new UriTypeSerializer())
.WithTypeConverter(new DateTimeOffsetSerializer())
.WithTypeConverter(new EquatableListSerializer(() => serializer.Build()))
.WithTypeConverter(new EquatableDictionarySerializer(() => serializer.WithNamingConvention(NullNamingConvention.Instance).Build()));
.WithTypeConverter(new EquatableDictionarySerializer(() => serializer.Build()));
};

/// <summary>
Expand All @@ -58,7 +58,7 @@ public class YamlSerializer(YamlDotNet.Serialization.ISerializer serializer, IDe
{
deserializer
.IgnoreUnmatchedProperties()
.WithNamingConvention(CamelCaseNamingConvention.Instance)
//.WithNamingConvention(CamelCaseNamingConvention.Instance)
.WithNodeTypeResolver(new InferTypeResolver())
.WithNodeDeserializer(
inner => new StringEnumDeserializer(inner),
Expand Down

0 comments on commit 1c793f9

Please sign in to comment.