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

Correct filter models #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
KoditkarVedant merged 13 commits into notion-dotnet:main from asevos:main
Jun 3, 2021
Merged

Correct filter models #19

KoditkarVedant merged 13 commits into notion-dotnet:main from asevos:main
Jun 3, 2021

Conversation

@asevos
Copy link
Contributor

@asevos asevos commented Jun 1, 2021

I moved every filter to a separate file, created filter condition classes. All filters have correct format now.
All filter properties with default values were wrapped in Nullable<T>.
I also wrote some test cases for filters. For this I changed RestClient.defaultSerializerSettings access to protected, so I could use in tests serializer settings identical to settings in RestClient

Copy link
Contributor

@KoditkarVedant KoditkarVedant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asevos Does it make sense to move Condition classes as part of respective Filter class and rename them to just Condition. Then we can use them as [Filter].Condition?

Rest all LGTM.

Copy link
Contributor Author

asevos commented Jun 2, 2021

@KoditkarVedant thank you for reviewing!
Yeah, moving conditions to be nested in filter class is a good idea, should've done that from the start. I will update my PR with this changes later today.

KoditkarVedant reacted with thumbs up emoji

Copy link
Contributor

@asevos I've added editorconfig to the solution. you might wanna run the dotnet format.

Copy link
Contributor Author

asevos commented Jun 3, 2021

@KoditkarVedant I moved conditions, formatted my files, added constructors to filters (as discussed in my constructor proposal ) and added to readme a section on how to query a db

Copy link
Contributor

@KoditkarVedant KoditkarVedant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Appreciate adding instructions on readme file.

@KoditkarVedant KoditkarVedant merged commit 00e71bd into notion-dotnet:main Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@KoditkarVedant KoditkarVedant KoditkarVedant approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Proposal: filter constructors for cleaner initialization Filters should not be serialized with default values, SinglePropertyFilter has wrong format

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