Skip to content

Commit

Permalink
fix: change ncco websocket endpoint contentType to content-type (#292)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rhbuckley authored Apr 30, 2024
1 parent b5432e4 commit e90726b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vonage/ncco_builder/connect_endpoints.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pydantic import BaseModel, HttpUrl, AnyUrl, constr, field_serializer
from typing import Dict
from pydantic import BaseModel, HttpUrl, AnyUrl, constr, field_serializer, Field
from typing import Dict, Annotated
from typing_extensions import Literal


Expand Down Expand Up @@ -29,7 +29,7 @@ class WebsocketEndpoint(Endpoint):
type: Literal['websocket'] = 'websocket'

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

@field_serializer('uri')
Expand Down

0 comments on commit e90726b

Please sign in to comment.