[BUG] Wrong typing in Client.insights.v1.rooms.list
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start from the RoomInstance definition behind Client.insights.v1.rooms.list, likely in the generated insights room resource, and compare its payload.get(...) assignments with the Video Log Analyzer Room Summary properties linked in the issue. Check whether these models are generated from the twilio-oai spec, since the durable fix may belong there and then be regenerated. Done when the documented non-optional fields are typed as required and the relevant insights tests still pass.
由索引模型根據 Issue 內容生成。
描述
Describe the bug
Client.insights.v1.rooms.list returns a list[RoomInstance]. But there is an issue with RoomInstance types, all the fields of that RoomInstance are optional. Are there any reason why they marked optional?
Code snippet
class RoomInstance:
self.account_sid: Optional[str] = payload.get("account_sid")
self.room_sid: Optional[str] = payload.get("room_sid")
self.room_name: Optional[str] = payload.get("room_name")
self.create_time: Optional[datetime] = deserialize.iso8601_datetime(
payload.get("create_time")
)
self.end_time: Optional[datetime] = deserialize.iso8601_datetime(
payload.get("end_time")
)
Actual behavior
According to your API docs, Room fields are not optional: https://www.twilio.com/docs/video/troubleshooting/video-log-analyzer-api#room-summary-resource-properties
But according to the code, they all are optional:
Expected behavior
All the fields should not be Optional
twilio-python version
9.13.0
Python version
3.9.11
Logs or error messages
No response
Additional context
No response
- 主要語言
- Python
- 星號
- 2.1k
- 分支
- 821
- 平均合併
- 9 小時 33 分鐘
- 30 天內合併 PR
- 3
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
twilio/twilio-python 的其他 Issue
-
Docs: "Handling Exceptions" should mention that network errors are not `TwilioRestException`可能已有人在做 @henricop 於 13 天前認領。 未關閉
難度 1/5 1-3 小時 新手友好度 90/100
twilio/twilio-python#986 · 1 則留言 ·
維護者通常 1 天內回覆
-
Clearer diagnostic when an API Key SID is passed without `account_sid`可能已有人在做 @saryeljaramany 於 5 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
twilio/twilio-python#985 · 1 則留言 ·
維護者通常 1 天內回覆
-
TokenPagination.next_page_async() makes a sync request and fails with an async http client可能已有人在做 @sebxt 於 31 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
twilio/twilio-python#976 ·
維護者通常 1 天內回覆
-
AsyncTwilioHttpClient does not JSON-serialize request bodies for application/json endpoints (sync client does) → 400 on JSON-body v2 endpoints可能已有人在做 @Steve0x2a 於 77 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
twilio/twilio-python#932 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
twilio/twilio-python#930 ·
維護者通常 1 天內回覆
查看 twilio/twilio-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 64/100
維護者通常 1 天內回覆
-
area:cli area:security enhancement priority:medium size:small
難度 2/5 1-3 小時 新手友好度 76/100
RonaldHensbergen/composable-data-stack#1338 ·
維護者通常 1 天內回覆
-
area:stdlib effort:S impact:med platform:linux type:bug
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆
-
automated endpoint-dead needs-curation
難度 2/5 1-3 小時 新手友好度 76/100
almanac-data/climate-almanac#139 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
UKGovernmentBEIS/inspect_ai#6695 · 1 則留言 ·
維護者通常 1 天內回覆