[BUG] Wrong typing in Client.insights.v1.rooms.list
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Python
- Sterne
- 2.1k
- Forks
- 821
- Ø Merge
- 9 Std. 33 Min.
- Gemergte PRs (30 T.)
- 3
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus twilio/twilio-python
-
Docs: "Handling Exceptions" should mention that network errors are not `TwilioRestException`Evtl. vergeben @henricop hat das vor 13 Tagen übernommen. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 90/100
twilio/twilio-python#986 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Clearer diagnostic when an API Key SID is passed without `account_sid`Evtl. vergeben @saryeljaramany hat das vor 5 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
twilio/twilio-python#985 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
TokenPagination.next_page_async() makes a sync request and fails with an async http clientEvtl. vergeben @sebxt hat das vor 31 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
twilio/twilio-python#976 ·
Maintainer antworten meist innerhalb von 1 Tag
-
AsyncTwilioHttpClient does not JSON-serialize request bodies for application/json endpoints (sync client does) → 400 on JSON-body v2 endpointsEvtl. vergeben @Steve0x2a hat das vor 77 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
twilio/twilio-python#932 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
twilio/twilio-python#930 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in twilio/twilio-python
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
Maintainer antworten meist innerhalb von 1 Tag
-
Harden tools/pr_threads.sh: pass all printed thread fields through the deterministic sanitizerOffenarea:cli area:security enhancement priority:medium size:small
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
RonaldHensbergen/composable-data-stack#1338 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:stdlib effort:S impact:med platform:linux type:bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
automated endpoint-dead needs-curation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
almanac-data/climate-almanac#139 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
UKGovernmentBEIS/inspect_ai#6695 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag