mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-20 14:17:11 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user