Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 1.0.0, Speakeasy CLI 1.121.1
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Nov 18, 2023
1 parent 468644a commit b3bd761
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 10 deletions.
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,12 @@ Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.120.3 (2.192.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.2] .
- [python v0.10.2] .

## 2023-11-18 01:17:12
### Changes
Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.121.1 (2.194.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.3] .
1 change: 1 addition & 0 deletions files.gen
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ src/test/utils/__init__.py
src/test/utils/retries.py
src/test/utils/utils.py
src/test/models/errors/sdkerror.py
tests/helpers.py
src/test/models/operations/createpets.py
src/test/models/operations/listpets.py
src/test/models/operations/showpetbyid.py
Expand Down
8 changes: 4 additions & 4 deletions gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ configVersion: 1.0.0
management:
docChecksum: 2516596125ef223fbbef6c434d22eaac
docVersion: 1.0.0
speakeasyVersion: 1.120.3
generationVersion: 2.192.1
speakeasyVersion: 1.121.1
generationVersion: 2.194.1
generation:
comments: {}
sdkClassName: test
Expand All @@ -13,9 +13,9 @@ generation:
features:
python:
core: 4.1.4
globalServerURLs: 2.82.0
globalServerURLs: 2.82.1
python:
version: 0.10.2
version: 0.10.3
author: my-test
clientServerStatusCodesAsErrors: true
description: Python Client SDK Generated by Speakeasy
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setuptools.setup(
name="test",
version="0.10.2",
version="0.10.3",
author="my-test",
description="Python Client SDK Generated by Speakeasy",
long_description=long_description,
Expand Down
6 changes: 3 additions & 3 deletions src/test/sdkconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class SDKConfiguration:
server_idx: int = 0
language: str = 'python'
openapi_doc_version: str = '1.0.0'
sdk_version: str = '0.10.2'
gen_version: str = '2.192.1'
user_agent: str = 'speakeasy-sdk/python 0.10.2 2.192.1 1.0.0 test'
sdk_version: str = '0.10.3'
gen_version: str = '2.194.1'
user_agent: str = 'speakeasy-sdk/python 0.10.3 2.194.1 1.0.0 test'
retry_config: RetryConfig = None

def get_server_details(self) -> Tuple[str, Dict[str, str]]:
Expand Down
2 changes: 1 addition & 1 deletion src/test/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ def marshal_json(val, encoder=None):

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

return json.dumps(val)
return json.dumps(val, separators=(',', ':'), sort_keys=True)


def match_content_type(content_type: str, pattern: str) -> boolean:
Expand Down
61 changes: 61 additions & 0 deletions tests/helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

import re


def sort_query_parameters(url):
parts = url.split("?")

if len(parts) == 1:
return url

query = parts[1]
params = query.split("&")

params.sort(key=lambda x: x.split('=')[0])

return parts[0] + "?" + "&".join(params)


def sort_serialized_maps(inp: any, regex: str, delim: str):

def sort_map(m):
entire_match = m.group(0)

groups = m.groups()

for group in groups:
pairs = []
if '=' in group:
pairs = group.split(delim)

pairs.sort(key=lambda x: x.split('=')[0])
else:
values = group.split(delim)

if len(values) == 1:
pairs = values
else:
pairs = [''] * int(len(values)/2)
# loop though every 2nd item
for i in range(0, len(values), 2):
pairs[int(i/2)] = values[i] + delim + values[i+1]

pairs.sort(key=lambda x: x.split(delim)[0])

entire_match = entire_match.replace(group, delim.join(pairs))

return entire_match

if isinstance(inp, str):
return re.sub(regex, sort_map, inp)
elif isinstance(inp, list):
for i, v in enumerate(inp):
inp[i] = sort_serialized_maps(v, regex, delim)
return inp
elif isinstance(inp, dict):
for k, v in inp.items():
inp[k] = sort_serialized_maps(v, regex, delim)
return inp
else:
raise Exception("Unsupported type")

0 comments on commit b3bd761

Please sign in to comment.