From 4a492f8c0a56cab81870a385adf35ede4e4fcda6 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sat, 21 Oct 2023 01:11:29 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.104.0 --- RELEASES.md | 10 +++++++++- docs/sdks/pets/README.md | 2 +- gen.yaml | 11 +++++++---- setup.py | 2 +- src/test/sdkconfiguration.py | 6 +++--- src/test/utils/utils.py | 20 ++++++++++++++++++++ 6 files changed, 41 insertions(+), 10 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index c4ff0d7..822a3aa 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -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] . \ No newline at end of file +- [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] . \ No newline at end of file diff --git a/docs/sdks/pets/README.md b/docs/sdks/pets/README.md index 1975ee1..6a00ca3 100755 --- a/docs/sdks/pets/README.md +++ b/docs/sdks/pets/README.md @@ -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) diff --git a/gen.yaml b/gen.yaml index fcf2f0a..34f68ef 100644 --- a/gen.yaml +++ b/gen.yaml @@ -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: . diff --git a/setup.py b/setup.py index 96f3590..d33e795 100755 --- a/setup.py +++ b/setup.py @@ -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, diff --git a/src/test/sdkconfiguration.py b/src/test/sdkconfiguration.py index 0447561..114a43e 100755 --- a/src/test/sdkconfiguration.py +++ b/src/test/sdkconfiguration.py @@ -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]]: diff --git a/src/test/utils/utils.py b/src/test/utils/utils.py index ccfad9f..3ab1261 100755 --- a/src/test/utils/utils.py +++ b/src/test/utils/utils.py @@ -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) @@ -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):