Title: fix(sites): Correct response parsing for sites.list() by umpa-loomp · Pull Request #123 · webflow/webflow-python · GitHub
Open Graph Title: fix(sites): Correct response parsing for sites.list() by umpa-loomp · Pull Request #123 · webflow/webflow-python
X Title: fix(sites): Correct response parsing for sites.list() by umpa-loomp · Pull Request #123 · webflow/webflow-python
Description: The sites.list() method incorrectly parses the API response, leading to a ValidationError. The /v2/sites endpoint returns a JSON object with a sites key containing a list of site objects: { "sites": [...] }. The current implementation attempts to parse this top-level object as a single Site model, which fails because required fields like id are missing at that level. This commit corrects the behavior by: Updating the return type hint to List[Site]. Modifying the parsing logic to first extract the list from the sites key before passing it to pydantic.parse_obj_as. This ensures the method correctly returns a list of Site objects as expected.
Open Graph Description: The sites.list() method incorrectly parses the API response, leading to a ValidationError. The /v2/sites endpoint returns a JSON object with a sites key containing a list of site objects: { "s...
X Description: The sites.list() method incorrectly parses the API response, leading to a ValidationError. The /v2/sites endpoint returns a JSON object with a sites key containing a list of site objects: { &qu...
Opengraph URL: https://github.com/webflow/webflow-python/pull/123
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:9b536778-6ada-458b-c72c-1b97d460aa44 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | A01C:21741:19E2A24:21DABD2:69817840 |
| html-safe-nonce | 9b2041d373d6d65d8102ad3cca40c0f9c6b2a44c038be37e3f5a6d063ac16bbf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDFDOjIxNzQxOjE5RTJBMjQ6MjFEQUJEMjo2OTgxNzg0MCIsInZpc2l0b3JfaWQiOiI3NjcxMjA2ODQ1MzgxNDQxNjAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 033913c2d80e80e683b8bfaefda81564c09e2b0a4acdc750d1970499ca1d7a3b |
| hovercard-subject-tag | pull_request:2898866468 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/webflow/webflow-python/pull/123/checks |
| twitter:image | https://avatars.githubusercontent.com/u/198206479?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/198206479?s=400&v=4 |
| og:image:alt | The sites.list() method incorrectly parses the API response, leading to a ValidationError. The /v2/sites endpoint returns a JSON object with a sites key containing a list of site objects: { "s... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e137814e266030874fd2c86863529d0622b13889eeda04148c57654b6ea84ad6 |
| turbo-cache-control | no-preview |
| go-import | github.com/webflow/webflow-python git https://github.com/webflow/webflow-python.git |
| octolytics-dimension-user_id | 1229663 |
| octolytics-dimension-user_login | webflow |
| octolytics-dimension-repository_id | 716241484 |
| octolytics-dimension-repository_nwo | webflow/webflow-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 716241484 |
| octolytics-dimension-repository_network_root_nwo | webflow/webflow-python |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | dd58d68a7813bbec9c91422c8c35f4af33832d70 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width