[python-nextgen] better sample code (#15248)

* better python-nextgen sample code

* remove future import

* fix signing doc

* better test

* use hasHttpBearerMethods instead
This commit is contained in:
William Cheng
2023-04-19 15:55:06 +08:00
committed by GitHub
parent e3fdac0711
commit 0176957e26
28 changed files with 325 additions and 880 deletions

View File

@@ -19,12 +19,12 @@ Test binary (gif) response body
### Example
```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
@@ -46,6 +46,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling BodyApi->test_binary_gif: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
@@ -79,12 +80,13 @@ Test body parameter(s)
### Example
```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.models.pet import Pet
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
@@ -107,6 +109,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling BodyApi->test_echo_body_pet: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
@@ -143,12 +146,13 @@ Test empty response body
### Example
```python
from __future__ import print_function
import time
import os
import openapi_client
from openapi_client.models.pet import Pet
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:3000
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
@@ -171,6 +175,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling BodyApi->test_echo_body_pet_response_string: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes