Skip to content

Commit 9830bcc

Browse files
committed
ci: regenerated with OpenAPI Doc 0.3.0, Speakeasy CLI 1.121.1
1 parent f705202 commit 9830bcc

File tree

7 files changed

+82
-10
lines changed

7 files changed

+82
-10
lines changed

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,4 +1056,14 @@ Based on:
10561056
### Generated
10571057
- [python v3.1.1] .
10581058
### Releases
1059-
- [PyPI v3.1.1] https://pypi.org/project/speakeasy-client-sdk-python/3.1.1 - .
1059+
- [PyPI v3.1.1] https://pypi.org/project/speakeasy-client-sdk-python/3.1.1 - .
1060+
1061+
## 2023-11-18 00:10:22
1062+
### Changes
1063+
Based on:
1064+
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
1065+
- Speakeasy CLI 1.121.1 (2.194.1) https://github.com/speakeasy-api/speakeasy
1066+
### Generated
1067+
- [python v3.1.2] .
1068+
### Releases
1069+
- [PyPI v3.1.2] https://pypi.org/project/speakeasy-client-sdk-python/3.1.2 - .

files.gen

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ src/speakeasy/utils/__init__.py
1414
src/speakeasy/utils/retries.py
1515
src/speakeasy/utils/utils.py
1616
src/speakeasy/models/errors/sdkerror.py
17+
tests/helpers.py
1718
src/speakeasy/models/operations/validateapikey.py
1819
src/speakeasy/models/operations/deleteapi.py
1920
src/speakeasy/models/operations/generateopenapispec.py

gen.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ configVersion: 1.0.0
22
management:
33
docChecksum: ba638b2ad28966c596e28321a2003686
44
docVersion: 0.3.0
5-
speakeasyVersion: 1.120.3
6-
generationVersion: 2.192.1
5+
speakeasyVersion: 1.121.1
6+
generationVersion: 2.194.1
77
generation:
88
comments: {}
99
sdkClassName: speakeasy
@@ -16,11 +16,11 @@ features:
1616
downloadStreams: 0.0.2
1717
examples: 2.81.3
1818
globalSecurity: 2.83.0
19-
globalServerURLs: 2.82.0
19+
globalServerURLs: 2.82.1
2020
inputOutputModels: 2.82.0
2121
serverIDs: 2.81.1
2222
python:
23-
version: 3.1.1
23+
version: 3.1.2
2424
author: Speakeasy
2525
clientServerStatusCodesAsErrors: true
2626
description: Speakeasy API Client SDK for Python

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setuptools.setup(
1212
name="speakeasy-client-sdk-python",
13-
version="3.1.1",
13+
version="3.1.2",
1414
author="Speakeasy",
1515
description="Speakeasy API Client SDK for Python",
1616
long_description=long_description,

src/speakeasy/sdkconfiguration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class SDKConfiguration:
2323
server: str = ''
2424
language: str = 'python'
2525
openapi_doc_version: str = '0.3.0'
26-
sdk_version: str = '3.1.1'
27-
gen_version: str = '2.192.1'
28-
user_agent: str = 'speakeasy-sdk/python 3.1.1 2.192.1 0.3.0 speakeasy-client-sdk-python'
26+
sdk_version: str = '3.1.2'
27+
gen_version: str = '2.194.1'
28+
user_agent: str = 'speakeasy-sdk/python 3.1.2 2.194.1 0.3.0 speakeasy-client-sdk-python'
2929
retry_config: RetryConfig = None
3030

3131
def get_server_details(self) -> Tuple[str, Dict[str, str]]:

src/speakeasy/utils/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ def marshal_json(val, encoder=None):
705705

706706
val = json_dict["res"] if encoder is None else encoder(json_dict["res"])
707707

708-
return json.dumps(val)
708+
return json.dumps(val, separators=(',', ':'), sort_keys=True)
709709

710710

711711
def match_content_type(content_type: str, pattern: str) -> boolean:

tests/helpers.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
2+
3+
import re
4+
5+
6+
def sort_query_parameters(url):
7+
parts = url.split("?")
8+
9+
if len(parts) == 1:
10+
return url
11+
12+
query = parts[1]
13+
params = query.split("&")
14+
15+
params.sort(key=lambda x: x.split('=')[0])
16+
17+
return parts[0] + "?" + "&".join(params)
18+
19+
20+
def sort_serialized_maps(inp: any, regex: str, delim: str):
21+
22+
def sort_map(m):
23+
entire_match = m.group(0)
24+
25+
groups = m.groups()
26+
27+
for group in groups:
28+
pairs = []
29+
if '=' in group:
30+
pairs = group.split(delim)
31+
32+
pairs.sort(key=lambda x: x.split('=')[0])
33+
else:
34+
values = group.split(delim)
35+
36+
if len(values) == 1:
37+
pairs = values
38+
else:
39+
pairs = [''] * int(len(values)/2)
40+
# loop though every 2nd item
41+
for i in range(0, len(values), 2):
42+
pairs[int(i/2)] = values[i] + delim + values[i+1]
43+
44+
pairs.sort(key=lambda x: x.split(delim)[0])
45+
46+
entire_match = entire_match.replace(group, delim.join(pairs))
47+
48+
return entire_match
49+
50+
if isinstance(inp, str):
51+
return re.sub(regex, sort_map, inp)
52+
elif isinstance(inp, list):
53+
for i, v in enumerate(inp):
54+
inp[i] = sort_serialized_maps(v, regex, delim)
55+
return inp
56+
elif isinstance(inp, dict):
57+
for k, v in inp.items():
58+
inp[k] = sort_serialized_maps(v, regex, delim)
59+
return inp
60+
else:
61+
raise Exception("Unsupported type")

0 commit comments

Comments
 (0)