Skip to content
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

Added support for button properties. #418

Conversation

kosaku-hayashi
Copy link
Contributor

@kosaku-hayashi kosaku-hayashi commented Jul 14, 2024

Description

Fixes #416

Added support for the new button property added to Notion. (ButtonProperty,ButtonPropertyValue) This fixes a problem that caused an exception when deserializing a query.

The button property information is shown below in JSON, and it appears that the button field is returned as an empty object at this time, even if the button property settings have been customized in Notion.
Therefore, the object that receives the button field is implemented as an empty class.

DB property
"testBtn":{ "id":"_ri%7C","name":"testBtn","type":"button","button":{ } },

Page property
"testBtn":{ "id":"_ri%7C","type":"button","button":{ } },

The existing test code has been modified to support the button property.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The unit test completed successfully and I tested with my Notion integration that the page and database queries and the search API work properly.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@kosaku-hayashi kosaku-hayashi force-pushed the issue-416-support-button-property branch from 0980495 to 609e04d Compare July 14, 2024 14:52
@kosaku-hayashi
Copy link
Contributor Author

Fixed problems with CodeFactor

@RStolzlechner
Copy link

Anything new on this? I have the same problem.

@KoditkarVedant
Copy link
Contributor

@kosaku-hayashi Looks like this PR also have changes from the #417

@KoditkarVedant KoditkarVedant merged commit 8a02230 into notion-dotnet:main Oct 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot deserialize the database with button properties
4 participants