Skip to content

Commit

Permalink
Merge pull request #136 from hognevevle/enum-converter
Browse files Browse the repository at this point in the history
Add StringEnumConverter
  • Loading branch information
KoditkarVedant authored Sep 28, 2021
2 parents 7e86091 + e0711c7 commit 0078ef3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Src/Notion.Client/Api/Search/Parameters/SearchFilter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
namespace Notion.Client
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace Notion.Client
{
public class SearchFilter
{
[JsonConverter(typeof(StringEnumConverter))]
public SearchObjectType Value { get; set; }
public string Property => "object";
}
Expand Down
4 changes: 2 additions & 2 deletions Src/Notion.Client/Api/Search/Parameters/SearchSort.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace Notion.Client
{
public class SearchSort
{
[JsonConverter(typeof(StringEnumConverter))]
public SearchDirection Direction { get; set; }

public string Timestamp { get; set; }
Expand Down

0 comments on commit 0078ef3

Please sign in to comment.