Skip to content

Commit 8ead725

Browse files
authored
SWI-7024 Update Generator Version (#239)
* SWI-7024 Update Generator Version * "" in smoke tests * assert content type in media smoke tests
1 parent dcb608c commit 8ead725

33 files changed

+420
-156
lines changed

.github/workflows/test-smoke.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- cron: "0 4 * * *"
66
pull_request:
77
paths:
8-
- 'test/smoke/**'
8+
- "test/smoke/**"
99
- ".github/workflows/test-smoke.yml"
1010
workflow_dispatch:
1111
inputs:

.gitlab-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ stages:
1414
- pip install -r test-requirements.txt
1515
- pytest --cov=bandwidth
1616

17-
pytest-3.7:
18-
extends: .pytest
19-
image: python:3.7-alpine
2017
pytest-3.8:
2118
extends: .pytest
2219
image: python:3.8-alpine
@@ -29,3 +26,6 @@ pytest-3.10:
2926
pytest-3.11:
3027
extends: .pytest
3128
image: python:3.11-alpine
29+
pytest-3.12:
30+
extends: .pytest
31+
image: python:3.12-alpine

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.7.0
1+
7.11.0

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# ref: https://docs.travis-ci.com/user/languages/python
22
language: python
33
python:
4-
- "3.7"
54
- "3.8"
65
- "3.9"
76
- "3.10"
87
- "3.11"
8+
- "3.12"
99
# uncomment the following if needed
10-
#- "3.11-dev" # 3.11 development branch
10+
#- "3.12-dev" # 3.12 development branch
1111
#- "nightly" # nightly build
1212
# command to install dependencies
1313
install:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
55

66
- API version: 1.0.0
77
- Package version: 1.0.0
8-
- Generator version: 7.7.0
8+
- Generator version: 7.11.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010
For more information, please visit [https://dev.bandwidth.com](https://dev.bandwidth.com)
1111

1212
## Requirements.
1313

14-
Python 3.7+
14+
Python 3.8+
1515

1616
## Installation & Usage
1717
### pip install

bandwidth/api/calls_api.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,9 @@ def _create_call_serialize(
298298
_query_params: List[Tuple[str, str]] = []
299299
_header_params: Dict[str, Optional[str]] = _headers or {}
300300
_form_params: List[Tuple[str, str]] = []
301-
_files: Dict[str, Union[str, bytes]] = {}
301+
_files: Dict[
302+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
303+
] = {}
302304
_body_params: Optional[bytes] = None
303305

304306
# process the path parameters
@@ -612,7 +614,9 @@ def _get_call_state_serialize(
612614
_query_params: List[Tuple[str, str]] = []
613615
_header_params: Dict[str, Optional[str]] = _headers or {}
614616
_form_params: List[Tuple[str, str]] = []
615-
_files: Dict[str, Union[str, bytes]] = {}
617+
_files: Dict[
618+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
619+
] = {}
616620
_body_params: Optional[bytes] = None
617621

618622
# process the path parameters
@@ -991,7 +995,9 @@ def _list_calls_serialize(
991995
_query_params: List[Tuple[str, str]] = []
992996
_header_params: Dict[str, Optional[str]] = _headers or {}
993997
_form_params: List[Tuple[str, str]] = []
994-
_files: Dict[str, Union[str, bytes]] = {}
998+
_files: Dict[
999+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1000+
] = {}
9951001
_body_params: Optional[bytes] = None
9961002

9971003
# process the path parameters
@@ -1334,7 +1340,9 @@ def _update_call_serialize(
13341340
_query_params: List[Tuple[str, str]] = []
13351341
_header_params: Dict[str, Optional[str]] = _headers or {}
13361342
_form_params: List[Tuple[str, str]] = []
1337-
_files: Dict[str, Union[str, bytes]] = {}
1343+
_files: Dict[
1344+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1345+
] = {}
13381346
_body_params: Optional[bytes] = None
13391347

13401348
# process the path parameters
@@ -1666,7 +1674,9 @@ def _update_call_bxml_serialize(
16661674
_query_params: List[Tuple[str, str]] = []
16671675
_header_params: Dict[str, Optional[str]] = _headers or {}
16681676
_form_params: List[Tuple[str, str]] = []
1669-
_files: Dict[str, Union[str, bytes]] = {}
1677+
_files: Dict[
1678+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1679+
] = {}
16701680
_body_params: Optional[bytes] = None
16711681

16721682
# process the path parameters

bandwidth/api/conferences_api.py

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from typing_extensions import Annotated
1919

2020
from pydantic import Field, StrictBytes, StrictStr
21-
from typing import List, Optional, Union
21+
from typing import List, Optional, Tuple, Union
2222
from typing_extensions import Annotated
2323
from bandwidth.models.conference import Conference
2424
from bandwidth.models.conference_member import ConferenceMember
@@ -312,7 +312,9 @@ def _download_conference_recording_serialize(
312312
_query_params: List[Tuple[str, str]] = []
313313
_header_params: Dict[str, Optional[str]] = _headers or {}
314314
_form_params: List[Tuple[str, str]] = []
315-
_files: Dict[str, Union[str, bytes]] = {}
315+
_files: Dict[
316+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
317+
] = {}
316318
_body_params: Optional[bytes] = None
317319

318320
# process the path parameters
@@ -617,7 +619,9 @@ def _get_conference_serialize(
617619
_query_params: List[Tuple[str, str]] = []
618620
_header_params: Dict[str, Optional[str]] = _headers or {}
619621
_form_params: List[Tuple[str, str]] = []
620-
_files: Dict[str, Union[str, bytes]] = {}
622+
_files: Dict[
623+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
624+
] = {}
621625
_body_params: Optional[bytes] = None
622626

623627
# process the path parameters
@@ -931,7 +935,9 @@ def _get_conference_member_serialize(
931935
_query_params: List[Tuple[str, str]] = []
932936
_header_params: Dict[str, Optional[str]] = _headers or {}
933937
_form_params: List[Tuple[str, str]] = []
934-
_files: Dict[str, Union[str, bytes]] = {}
938+
_files: Dict[
939+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
940+
] = {}
935941
_body_params: Optional[bytes] = None
936942

937943
# process the path parameters
@@ -1247,7 +1253,9 @@ def _get_conference_recording_serialize(
12471253
_query_params: List[Tuple[str, str]] = []
12481254
_header_params: Dict[str, Optional[str]] = _headers or {}
12491255
_form_params: List[Tuple[str, str]] = []
1250-
_files: Dict[str, Union[str, bytes]] = {}
1256+
_files: Dict[
1257+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1258+
] = {}
12511259
_body_params: Optional[bytes] = None
12521260

12531261
# process the path parameters
@@ -1550,7 +1558,9 @@ def _list_conference_recordings_serialize(
15501558
_query_params: List[Tuple[str, str]] = []
15511559
_header_params: Dict[str, Optional[str]] = _headers or {}
15521560
_form_params: List[Tuple[str, str]] = []
1553-
_files: Dict[str, Union[str, bytes]] = {}
1561+
_files: Dict[
1562+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1563+
] = {}
15541564
_body_params: Optional[bytes] = None
15551565

15561566
# process the path parameters
@@ -1903,7 +1913,9 @@ def _list_conferences_serialize(
19031913
_query_params: List[Tuple[str, str]] = []
19041914
_header_params: Dict[str, Optional[str]] = _headers or {}
19051915
_form_params: List[Tuple[str, str]] = []
1906-
_files: Dict[str, Union[str, bytes]] = {}
1916+
_files: Dict[
1917+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1918+
] = {}
19071919
_body_params: Optional[bytes] = None
19081920

19091921
# process the path parameters
@@ -2235,7 +2247,9 @@ def _update_conference_serialize(
22352247
_query_params: List[Tuple[str, str]] = []
22362248
_header_params: Dict[str, Optional[str]] = _headers or {}
22372249
_form_params: List[Tuple[str, str]] = []
2238-
_files: Dict[str, Union[str, bytes]] = {}
2250+
_files: Dict[
2251+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2252+
] = {}
22392253
_body_params: Optional[bytes] = None
22402254

22412255
# process the path parameters
@@ -2564,7 +2578,9 @@ def _update_conference_bxml_serialize(
25642578
_query_params: List[Tuple[str, str]] = []
25652579
_header_params: Dict[str, Optional[str]] = _headers or {}
25662580
_form_params: List[Tuple[str, str]] = []
2567-
_files: Dict[str, Union[str, bytes]] = {}
2581+
_files: Dict[
2582+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2583+
] = {}
25682584
_body_params: Optional[bytes] = None
25692585

25702586
# process the path parameters
@@ -2906,7 +2922,9 @@ def _update_conference_member_serialize(
29062922
_query_params: List[Tuple[str, str]] = []
29072923
_header_params: Dict[str, Optional[str]] = _headers or {}
29082924
_form_params: List[Tuple[str, str]] = []
2909-
_files: Dict[str, Union[str, bytes]] = {}
2925+
_files: Dict[
2926+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2927+
] = {}
29102928
_body_params: Optional[bytes] = None
29112929

29122930
# process the path parameters

bandwidth/api/media_api.py

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from typing_extensions import Annotated
1919

2020
from pydantic import Field, StrictBytes, StrictStr
21-
from typing import List, Optional, Union
21+
from typing import List, Optional, Tuple, Union
2222
from typing_extensions import Annotated
2323
from bandwidth.models.media import Media
2424

@@ -295,7 +295,9 @@ def _delete_media_serialize(
295295
_query_params: List[Tuple[str, str]] = []
296296
_header_params: Dict[str, Optional[str]] = _headers or {}
297297
_form_params: List[Tuple[str, str]] = []
298-
_files: Dict[str, Union[str, bytes]] = {}
298+
_files: Dict[
299+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
300+
] = {}
299301
_body_params: Optional[bytes] = None
300302

301303
# process the path parameters
@@ -596,7 +598,9 @@ def _get_media_serialize(
596598
_query_params: List[Tuple[str, str]] = []
597599
_header_params: Dict[str, Optional[str]] = _headers or {}
598600
_form_params: List[Tuple[str, str]] = []
599-
_files: Dict[str, Union[str, bytes]] = {}
601+
_files: Dict[
602+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
603+
] = {}
600604
_body_params: Optional[bytes] = None
601605

602606
# process the path parameters
@@ -898,7 +902,9 @@ def _list_media_serialize(
898902
_query_params: List[Tuple[str, str]] = []
899903
_header_params: Dict[str, Optional[str]] = _headers or {}
900904
_form_params: List[Tuple[str, str]] = []
901-
_files: Dict[str, Union[str, bytes]] = {}
905+
_files: Dict[
906+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
907+
] = {}
902908
_body_params: Optional[bytes] = None
903909

904910
# process the path parameters
@@ -949,7 +955,7 @@ def upload_media(
949955
self,
950956
account_id: Annotated[StrictStr, Field(description="Your Bandwidth Account ID.")],
951957
media_id: Annotated[StrictStr, Field(description="Media ID to retrieve.")],
952-
body: Union[StrictBytes, StrictStr],
958+
body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
953959
content_type: Annotated[Optional[StrictStr], Field(description="The media type of the entity-body.")] = None,
954960
cache_control: Annotated[Optional[StrictStr], Field(description="General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain.")] = None,
955961
_request_timeout: Union[
@@ -1040,7 +1046,7 @@ def upload_media_with_http_info(
10401046
self,
10411047
account_id: Annotated[StrictStr, Field(description="Your Bandwidth Account ID.")],
10421048
media_id: Annotated[StrictStr, Field(description="Media ID to retrieve.")],
1043-
body: Union[StrictBytes, StrictStr],
1049+
body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
10441050
content_type: Annotated[Optional[StrictStr], Field(description="The media type of the entity-body.")] = None,
10451051
cache_control: Annotated[Optional[StrictStr], Field(description="General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain.")] = None,
10461052
_request_timeout: Union[
@@ -1131,7 +1137,7 @@ def upload_media_without_preload_content(
11311137
self,
11321138
account_id: Annotated[StrictStr, Field(description="Your Bandwidth Account ID.")],
11331139
media_id: Annotated[StrictStr, Field(description="Media ID to retrieve.")],
1134-
body: Union[StrictBytes, StrictStr],
1140+
body: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
11351141
content_type: Annotated[Optional[StrictStr], Field(description="The media type of the entity-body.")] = None,
11361142
cache_control: Annotated[Optional[StrictStr], Field(description="General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain.")] = None,
11371143
_request_timeout: Union[
@@ -1238,7 +1244,9 @@ def _upload_media_serialize(
12381244
_query_params: List[Tuple[str, str]] = []
12391245
_header_params: Dict[str, Optional[str]] = _headers or {}
12401246
_form_params: List[Tuple[str, str]] = []
1241-
_files: Dict[str, Union[str, bytes]] = {}
1247+
_files: Dict[
1248+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1249+
] = {}
12421250
_body_params: Optional[bytes] = None
12431251

12441252
# process the path parameters
@@ -1259,6 +1267,9 @@ def _upload_media_serialize(
12591267
if isinstance(body, str):
12601268
with open(body, "rb") as _fp:
12611269
_body_params = _fp.read()
1270+
elif isinstance(body, tuple):
1271+
# drop the filename from the tuple
1272+
_body_params = body[1]
12621273
else:
12631274
_body_params = body
12641275

bandwidth/api/messages_api.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,9 @@ def _create_message_serialize(
300300
_query_params: List[Tuple[str, str]] = []
301301
_header_params: Dict[str, Optional[str]] = _headers or {}
302302
_form_params: List[Tuple[str, str]] = []
303-
_files: Dict[str, Union[str, bytes]] = {}
303+
_files: Dict[
304+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
305+
] = {}
304306
_body_params: Optional[bytes] = None
305307

306308
# process the path parameters
@@ -793,7 +795,9 @@ def _list_messages_serialize(
793795
_query_params: List[Tuple[str, str]] = []
794796
_header_params: Dict[str, Optional[str]] = _headers or {}
795797
_form_params: List[Tuple[str, str]] = []
796-
_files: Dict[str, Union[str, bytes]] = {}
798+
_files: Dict[
799+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
800+
] = {}
797801
_body_params: Optional[bytes] = None
798802

799803
# process the path parameters

bandwidth/api/mfa_api.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ def _generate_messaging_code_serialize(
286286
_query_params: List[Tuple[str, str]] = []
287287
_header_params: Dict[str, Optional[str]] = _headers or {}
288288
_form_params: List[Tuple[str, str]] = []
289-
_files: Dict[str, Union[str, bytes]] = {}
289+
_files: Dict[
290+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
291+
] = {}
290292
_body_params: Optional[bytes] = None
291293

292294
# process the path parameters
@@ -588,7 +590,9 @@ def _generate_voice_code_serialize(
588590
_query_params: List[Tuple[str, str]] = []
589591
_header_params: Dict[str, Optional[str]] = _headers or {}
590592
_form_params: List[Tuple[str, str]] = []
591-
_files: Dict[str, Union[str, bytes]] = {}
593+
_files: Dict[
594+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
595+
] = {}
592596
_body_params: Optional[bytes] = None
593597

594598
# process the path parameters
@@ -893,7 +897,9 @@ def _verify_code_serialize(
893897
_query_params: List[Tuple[str, str]] = []
894898
_header_params: Dict[str, Optional[str]] = _headers or {}
895899
_form_params: List[Tuple[str, str]] = []
896-
_files: Dict[str, Union[str, bytes]] = {}
900+
_files: Dict[
901+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
902+
] = {}
897903
_body_params: Optional[bytes] = None
898904

899905
# process the path parameters

0 commit comments

Comments
 (0)