Skip to content

Commit e90726b

Browse files
authored
fix: change ncco websocket endpoint contentType to content-type (#292)
The Vonage Voice Answer API expects a field called "content-type", this model exports a field "contentType". The Vonage Voice API does not recognize this.
1 parent b5432e4 commit e90726b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vonage/ncco_builder/connect_endpoints.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from pydantic import BaseModel, HttpUrl, AnyUrl, constr, field_serializer
2-
from typing import Dict
1+
from pydantic import BaseModel, HttpUrl, AnyUrl, constr, field_serializer, Field
2+
from typing import Dict, Annotated
33
from typing_extensions import Literal
44

55

@@ -29,7 +29,7 @@ class WebsocketEndpoint(Endpoint):
2929
type: Literal['websocket'] = 'websocket'
3030

3131
uri: AnyUrl
32-
contentType: Literal['audio/l16;rate=16000', 'audio/l16;rate=8000']
32+
contentType: Annotated[Literal['audio/l16;rate=16000', 'audio/l16;rate=8000'], Field(serialization_alias='content-type')]
3333
headers: dict = None
3434

3535
@field_serializer('uri')

0 commit comments

Comments
 (0)