You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The
ToggleBlock
specifiesRichText
andText
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, theRichText
field misses theomitempty
, 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 toToggleBlock.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.
The text was updated successfully, but these errors were encountered: