Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 1.0.0, Speakeasy CLI 1.147.0
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Jan 19, 2024
1 parent 0b5fb2e commit 6b3e90c
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ management:
docChecksum: 2516596125ef223fbbef6c434d22eaac
docVersion: 1.0.0
speakeasyVersion: internal
generationVersion: 2.233.2
releaseVersion: 0.11.2
configChecksum: d15c328d3610e2520e162998d8b04198
generationVersion: 2.237.2
releaseVersion: 0.11.3
configChecksum: 8f6c05f4b24cd03c0c39dad64dadb040
repoURL: https://github.com/speakeasy-sdks/test-repo-test2.git
repoSubDirectory: .
installationURL: https://github.com/speakeasy-sdks/test-repo-test2.git
features:
python:
core: 4.4.1
core: 4.4.2
globalServerURLs: 2.82.1
generatedFiles:
- src/test/sdkconfiguration.py
Expand Down
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,12 @@ Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.141.1 (2.233.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.2] .
- [python v0.11.2] .

## 2024-01-19 01:35:55
### Changes
Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.147.0 (2.237.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.11.3] .
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ generation:
fixes:
nameResolutionDec2023: false
python:
version: 0.11.2
version: 0.11.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.11.2",
version="0.11.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.11.2'
gen_version: str = '2.233.2'
user_agent: str = 'speakeasy-sdk/python 0.11.2 2.233.2 1.0.0 test'
sdk_version: str = '0.11.3'
gen_version: str = '2.237.2'
user_agent: str = 'speakeasy-sdk/python 0.11.3 2.237.2 1.0.0 test'
retry_config: RetryConfig = None

def get_server_details(self) -> Tuple[str, Dict[str, str]]:
Expand Down
11 changes: 7 additions & 4 deletions src/test/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,22 @@ def _parse_security_scheme_value(client: SecurityClient, scheme_metadata: Dict,
else:
raise Exception('not supported')
elif scheme_type == "openIdConnect":
client.client.headers[header_name] = value
client.client.headers[header_name] = _apply_bearer(value)
elif scheme_type == 'oauth2':
client.client.headers[header_name] = value
client.client.headers[header_name] = _apply_bearer(value)
elif scheme_type == 'http':
if sub_type == 'bearer':
client.client.headers[header_name] = value.lower().startswith(
'bearer ') and value or f'Bearer {value}'
client.client.headers[header_name] = _apply_bearer(value)
else:
raise Exception('not supported')
else:
raise Exception('not supported')


def _apply_bearer(token: str) -> str:
return token.lower().startswith('bearer ') and token or f'Bearer {token}'


def _parse_basic_auth_scheme(client: SecurityClient, scheme: dataclass):
username = ""
password = ""
Expand Down

0 comments on commit 6b3e90c

Please sign in to comment.