Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 1.0.0, Speakeasy CLI 1.120.3
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Nov 16, 2023
1 parent 8d97a4b commit 468644a
Show file tree
Hide file tree
Showing 33 changed files with 43 additions and 37 deletions.
Empty file modified .gitattributes
100755 → 100644
Empty file.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ pip install git+https://github.com/speakeasy-sdks/test-repo-test2.git

## SDK Example Usage
<!-- Start SDK Example Usage -->
### Example

```python
import test

Expand Down Expand Up @@ -56,16 +58,15 @@ Here's an example of one such pagination call:


<!-- Start Error Handling -->
# Error Handling
## Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.

| Error Object | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.SDKError | 400-600 | */* |


## Example
### Example

```python
import test
Expand All @@ -90,17 +91,17 @@ if res.status_code == 200:


<!-- Start Server Selection -->
# Server Selection
## Server Selection

## Select Server by Index
### Select Server by Index

You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

| # | Server | Variables |
| - | ------ | --------- |
| 0 | `http://petstore.swagger.io/v1` | None |

For example:
#### Example

```python
import test
Expand All @@ -118,10 +119,9 @@ if res.status_code == 200:
```


## Override Server URL Per-Client
### Override Server URL Per-Client

The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:

```python
import test

Expand All @@ -141,13 +141,11 @@ if res.status_code == 200:


<!-- Start Custom HTTP Client -->
# Custom HTTP Client
## Custom HTTP Client

The Python SDK makes API calls using the (requests)[https://pypi.org/project/requests/] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.


For example, you could specify a header for every request that this sdk makes as follows:

```python
import test
import requests
Expand Down
10 changes: 9 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,12 @@ Based on:
- OpenAPI Doc 1.0.0
- Speakeasy CLI 1.116.0 (2.185.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.10.1] .
- [python v0.10.1] .

## 2023-11-16 01:18:16
### Changes
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] .
2 changes: 0 additions & 2 deletions USAGE.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<!-- Start SDK Example Usage -->


```python
import test

Expand Down
2 changes: 1 addition & 1 deletion docs/models/operations/createpetsresponse.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
| `error` | [Optional[shared.Error]](../../models/shared/error.md) | :heavy_minus_sign: | unexpected error |
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
Empty file modified docs/models/operations/listpetsrequest.md
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions docs/models/operations/listpetsresponse.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `content_type` | *str* | :heavy_check_mark: | HTTP response content type for this operation |
| `error` | [Optional[shared.Error]](../../models/shared/error.md) | :heavy_minus_sign: | unexpected error |
| `headers` | Dict[str, List[*str*]] | :heavy_minus_sign: | N/A |
| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A |
| `pets` | List[[shared.Pet](../../models/shared/pet.md)] | :heavy_minus_sign: | A paged array of pets |
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
Empty file modified docs/models/operations/showpetbyidrequest.md
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion docs/models/operations/showpetbyidresponse.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
| `error` | [Optional[shared.Error]](../../models/shared/error.md) | :heavy_minus_sign: | unexpected error |
| `pet` | [Optional[shared.Pet]](../../models/shared/pet.md) | :heavy_minus_sign: | Expected response to a valid request |
| `status_code` | *int* | :heavy_check_mark: | HTTP response status code for this operation |
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing |
| `raw_response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
Empty file modified docs/models/shared/error.md
100755 → 100644
Empty file.
Empty file modified docs/models/shared/pet.md
100755 → 100644
Empty file.
Empty file modified docs/sdks/pets/README.md
100755 → 100644
Empty file.
Empty file modified docs/sdks/test/README.md
100755 → 100644
Empty file.
10 changes: 6 additions & 4 deletions gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ configVersion: 1.0.0
management:
docChecksum: 2516596125ef223fbbef6c434d22eaac
docVersion: 1.0.0
speakeasyVersion: 1.116.0
generationVersion: 2.185.0
speakeasyVersion: 1.120.3
generationVersion: 2.192.1
generation:
comments: {}
sdkClassName: test
repoURL: https://github.com/speakeasy-sdks/test-repo-test2.git
usageSnippets:
optionalPropertyRendering: withExample
features:
python:
core: 4.1.2
core: 4.1.4
globalServerURLs: 2.82.0
python:
version: 0.10.1
version: 0.10.2
author: my-test
clientServerStatusCodesAsErrors: true
description: Python Client SDK Generated by Speakeasy
Expand Down
Empty file modified pylintrc
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion setup.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setuptools.setup(
name="test",
version="0.10.1",
version="0.10.2",
author="my-test",
description="Python Client SDK Generated by Speakeasy",
long_description=long_description,
Expand Down
Empty file modified src/test/__init__.py
100755 → 100644
Empty file.
Empty file modified src/test/models/__init__.py
100755 → 100644
Empty file.
Empty file modified src/test/models/errors/__init__.py
100755 → 100644
Empty file.
Empty file modified src/test/models/errors/sdkerror.py
100755 → 100644
Empty file.
Empty file modified src/test/models/operations/__init__.py
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions src/test/models/operations/createpets.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
class CreatePetsResponse:
content_type: str = dataclasses.field()
r"""HTTP response content type for this operation"""
raw_response: requests_http.Response = dataclasses.field()
r"""Raw HTTP response; suitable for custom response parsing"""
status_code: int = dataclasses.field()
r"""HTTP response status code for this operation"""
error: Optional[shared_error.Error] = dataclasses.field(default=None)
r"""unexpected error"""
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
r"""Raw HTTP response; suitable for custom response parsing"""


6 changes: 3 additions & 3 deletions src/test/models/operations/listpets.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ class ListPetsRequest:
class ListPetsResponse:
content_type: str = dataclasses.field()
r"""HTTP response content type for this operation"""
headers: Dict[str, List[str]] = dataclasses.field()
raw_response: requests_http.Response = dataclasses.field()
r"""Raw HTTP response; suitable for custom response parsing"""
status_code: int = dataclasses.field()
r"""HTTP response status code for this operation"""
error: Optional[shared_error.Error] = dataclasses.field(default=None)
r"""unexpected error"""
headers: Optional[Dict[str, List[str]]] = dataclasses.field(default=None)
pets: Optional[List[shared_pet.Pet]] = dataclasses.field(default=None)
r"""A paged array of pets"""
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
r"""Raw HTTP response; suitable for custom response parsing"""


4 changes: 2 additions & 2 deletions src/test/models/operations/showpetbyid.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ class ShowPetByIDRequest:
class ShowPetByIDResponse:
content_type: str = dataclasses.field()
r"""HTTP response content type for this operation"""
raw_response: requests_http.Response = dataclasses.field()
r"""Raw HTTP response; suitable for custom response parsing"""
status_code: int = dataclasses.field()
r"""HTTP response status code for this operation"""
error: Optional[shared_error.Error] = dataclasses.field(default=None)
r"""unexpected error"""
pet: Optional[shared_pet.Pet] = dataclasses.field(default=None)
r"""Expected response to a valid request"""
raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)
r"""Raw HTTP response; suitable for custom response parsing"""


Empty file modified src/test/models/shared/__init__.py
100755 → 100644
Empty file.
Empty file modified src/test/models/shared/error.py
100755 → 100644
Empty file.
Empty file modified src/test/models/shared/pet.py
100755 → 100644
Empty file.
8 changes: 4 additions & 4 deletions src/test/pets.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def create_pets(self) -> operations.CreatePetsResponse:

http_res = client.request('POST', url, headers=headers)
content_type = http_res.headers.get('Content-Type')

res = operations.CreatePetsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)

if http_res.status_code == 201:
Expand Down Expand Up @@ -58,8 +58,8 @@ def list_pets(self, request: operations.ListPetsRequest) -> operations.ListPetsR

http_res = client.request('GET', url, params=query_params, headers=headers)
content_type = http_res.headers.get('Content-Type')

res = operations.ListPetsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
res = operations.ListPetsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res, headers=None)

if http_res.status_code == 200:
res.headers = http_res.headers
Expand Down Expand Up @@ -95,7 +95,7 @@ def show_pet_by_id(self, request: operations.ShowPetByIDRequest) -> operations.S

http_res = client.request('GET', url, headers=headers)
content_type = http_res.headers.get('Content-Type')

res = operations.ShowPetByIDResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)

if http_res.status_code == 200:
Expand Down
Empty file modified src/test/sdk.py
100755 → 100644
Empty file.
6 changes: 3 additions & 3 deletions src/test/sdkconfiguration.py
100755 → 100644
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.1'
gen_version: str = '2.185.0'
user_agent: str = 'speakeasy-sdk/python 0.10.1 2.185.0 1.0.0 test'
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'
retry_config: RetryConfig = None

def get_server_details(self) -> Tuple[str, Dict[str, str]]:
Expand Down
Empty file modified src/test/utils/__init__.py
100755 → 100644
Empty file.
Empty file modified src/test/utils/retries.py
100755 → 100644
Empty file.
Empty file modified src/test/utils/utils.py
100755 → 100644
Empty file.

0 comments on commit 468644a

Please sign in to comment.