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

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

Closed
jamescarter-le opened this issue Nov 23, 2022 · 1 comment · Fixed by #354
Closed

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

jamescarter-le opened this issue Nov 23, 2022 · 1 comment · Fixed by #354
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jamescarter-le
Copy link

jamescarter-le commented Nov 23, 2022

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
Copy link
Contributor

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

@KoditkarVedant KoditkarVedant added the bug Something isn't working label Jan 24, 2023
@KoditkarVedant KoditkarVedant self-assigned this Jan 24, 2023
@KoditkarVedant KoditkarVedant added this to the 4.1.0 milestone Jan 24, 2023
@KoditkarVedant KoditkarVedant linked a pull request Jan 24, 2023 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants