notion-dotnet / notion-sdk-net

A Notion SDK for .Net
MIT License
181 stars 46 forks source link

Incorrect Type: TableBlock.TableInfo.Children should be IEnumerable #347

Closed jamescarter-le closed 1 year ago

jamescarter-le commented 1 year ago

When creating a Page with a Table, you cannot send the request, as the Notion API requires Table to have Children, at minimum an empty array, however TableInfo type has Children as TableRowBlock instead of IEnumerable<TableRowBlock>

body failed validation: body.children[2].table.children should be an array, instead was {"type":"table_row","object":"block","created_time":"00...

Solution: Modify Notion.Client.TableBlock.TableInfo.Children to be IEnumerable<TableRowBlock>

KoditkarVedant commented 1 year ago

@jamescarter-le would you like to submit a PR? I will be more than happy to accept it.