[BUG] Wrong typing in Client.insights.v1.rooms.list

Aperta
#992 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

type: bug
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")
        )

Screenshot 2026-11-18 at 18 15 53
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
Screenshot 2026-11-18 at 18 11 01
But according to the code, they all are optional:
Screenshot 2026-11-18 at 18 11 31
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

Lingua principale
Python
Stelle
2.1k
Fork
821
Merge medio
9h 33m
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di twilio/twilio-python

Tutte le issue di twilio/twilio-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.