Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.104.0
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Oct 21, 2023
1 parent 0df4734 commit 4a492f8
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 10 deletions.
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,12 @@ Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.101.0 (2.161.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.8.0] .
- [python v0.8.0] .

## 2023-10-21 01:11:14
### Changes
Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.104.0 (2.169.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.9.0] .
2 changes: 1 addition & 1 deletion docs/sdks/pets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ from test.models import operations
s = test.Test()

req = operations.ShowPetByIDRequest(
pet_id='Bicycle',
pet_id='string',
)

res = s.pets.show_pet_by_id(req)
Expand Down
11 changes: 7 additions & 4 deletions gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@ configVersion: 1.0.0
management:
docChecksum: 2516596125ef223fbbef6c434d22eaac
docVersion: 1.0.0
speakeasyVersion: 1.101.0
generationVersion: 2.161.0
speakeasyVersion: 1.104.0
generationVersion: 2.169.0
generation:
comments:
disableComments: false
omitDescriptionIfSummaryPresent: false
baseServerURL: ""
repoURL: https://github.com/speakeasy-sdks/test-repo-test2.git
sdkClassName: test
singleTagPerOp: false
tagNamespacingDisabled: false
features:
python:
core: 3.0.2
core: 3.3.0
globalServerURLs: 2.82.0
python:
version: 0.8.0
version: 0.9.0
author: my-test
clientServerStatusCodesAsErrors: true
description: Python Client SDK Generated by Speakeasy
flattenGlobalSecurity: true
installationURL: https://github.com/speakeasy-sdks/test-repo-test2.git
maxMethodParams: 0
packageName: test
repoSubDirectory: .
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.8.0",
version="0.9.0",
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 @@ -20,9 +20,9 @@ class SDKConfiguration:
server_idx: int = 0
language: str = 'python'
openapi_doc_version: str = '1.0.0'
sdk_version: str = '0.8.0'
gen_version: str = '2.161.0'
user_agent: str = 'speakeasy-sdk/python 0.8.0 2.161.0 1.0.0 test'
sdk_version: str = '0.9.0'
gen_version: str = '2.169.0'
user_agent: str = 'speakeasy-sdk/python 0.9.0 2.169.0 1.0.0 test'
retry_config: RetryConfig = None

def get_server_details(self) -> Tuple[str, Dict[str, str]]:
Expand Down
20 changes: 20 additions & 0 deletions src/test/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,8 @@ def bigintencode(val: int):


def bigintdecoder(val):
if isinstance(val, float):
raise ValueError(f"{val} is a float")
return int(val)


Expand Down Expand Up @@ -828,6 +830,24 @@ def list_decode(val: List):

return list_decode

def union_encoder(all_encoders: Dict[str, Callable]):
def selective_encoder(val: any):
if type(val) in all_encoders:
return all_encoders[type(val)](val)
return val
return selective_encoder

def union_decoder(all_decoders: List[Callable]):
def selective_decoder(val: any):
decoded = val
for decoder in all_decoders:
try:
decoded = decoder(val)
break
except (TypeError, ValueError):
continue
return decoded
return selective_decoder

def get_field_name(name):
def override(_, _field_name=name):
Expand Down

0 comments on commit 4a492f8

Please sign in to comment.