[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

@@ -23,12 +23,12 @@ Test query parameter(s)
### 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(
@@ -53,6 +53,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling QueryApi->test_query_datetime_date_string: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
@@ -91,12 +92,12 @@ Test query parameter(s)
### 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(
@@ -121,6 +122,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling QueryApi->test_query_integer_boolean_string: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
@@ -159,12 +161,12 @@ Test query parameter(s)
### 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(
@@ -187,6 +189,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling QueryApi->test_query_style_deep_object_explode_true_object: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
@@ -223,12 +226,12 @@ Test query parameter(s)
### 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(
@@ -251,6 +254,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling QueryApi->test_query_style_deep_object_explode_true_object_all_of: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
@@ -287,12 +291,12 @@ Test query parameter(s)
### 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(
@@ -315,6 +319,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling QueryApi->test_query_style_form_explode_true_array_string: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
@@ -351,12 +356,12 @@ Test query parameter(s)
### 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(
@@ -379,6 +384,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling QueryApi->test_query_style_form_explode_true_object: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
@@ -415,12 +421,12 @@ Test query parameter(s)
### 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(
@@ -443,6 +449,7 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling QueryApi->test_query_style_form_explode_true_object_all_of: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes