umbraco / Umbraco.Headless.Client.Net

.NET Client Library and Samples for the Umbraco headless cms Cloud Service called Umbraco Heartcore
https://umbraco.com/products/umbraco-heartcore/
13 stars 14 forks source link

Fix: Filter Match type is not serialized to string #20

Closed NiclasLindqvist closed 4 years ago

NiclasLindqvist commented 4 years ago

When using ContentDelivery.Filter() the ContentFilterProperties property Match (which is an enum) was not serialized to a string, causing the Refit-request to send requests similar to

{
    "ContentTypeAlias": "product",
    "Properties":[
        {
            "Alias": "nodeName",
            "Value": "Lorem",
            "Match": "0"
        }
     ]
}

This is resolved by adding the attribute [JsonConverter(typeof(StringEnumConverter))]

sitereactor commented 4 years ago

Seems like a sensible correction to me 👍