Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0078ef3

Browse files
Merge pull request #136 from hognevevle/enum-converter
Add StringEnumConverter
2 parents 7e86091 + e0711c7 commit 0078ef3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

‎Src/Notion.Client/Api/Search/Parameters/SearchFilter.cs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
namespace Notion.Client
1+
using Newtonsoft.Json;
2+
using Newtonsoft.Json.Converters;
3+
4+
namespace Notion.Client
25
{
36
public class SearchFilter
47
{
8+
[JsonConverter(typeof(StringEnumConverter))]
59
public SearchObjectType Value { get; set; }
610
public string Property => "object";
711
}

‎Src/Notion.Client/Api/Search/Parameters/SearchSort.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
using System;
2-
using Newtonsoft.Json;
1+
using Newtonsoft.Json;
32
using Newtonsoft.Json.Converters;
43

54
namespace Notion.Client
65
{
76
public class SearchSort
87
{
8+
[JsonConverter(typeof(StringEnumConverter))]
99
public SearchDirection Direction { get; set; }
1010

1111
public string Timestamp { get; set; }

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /