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

Omit the unnecessary fields in toggle block #93

Closed
yoyomolinas opened this issue Jun 19, 2022 · 1 comment
Closed

Omit the unnecessary fields in toggle block #93

yoyomolinas opened this issue Jun 19, 2022 · 1 comment

Comments

@yoyomolinas
Copy link

The ToggleBlock specifies RichText and Text fields which are not documented in the Notion API. I suppose these were left from earlier versions.

Practically, these fields should not be causing any errors as they're serialised only when they're present (i.e. omitempty). However, the RichText field misses the omitempty, causing error responses form Notion.

Would be great if the unnecessary fields can be cleaned up - if that's too much work just adding an omitempty tag to ToggleBlock.RichText would do the job too.

Ref. https://github.com/jomei/notionapi/blob/main/block.go#L352.

PS, not sure how you manage contributions here, but given the right permissions I can open up a PR as well.

Many thanks.

@jomei
Copy link
Owner

jomei commented Aug 23, 2022

Fixed in #102

@jomei jomei closed this as completed Aug 23, 2022
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

No branches or pull requests

2 participants