forked from loafle/openapi-generator-original
Add multiple servers support to Python client (#1969)
* add multiple server support to python client * various fixes * minor fixes, add tests * test oas2 python first * fix tests * fix issues reported by flake8 * update code format * add python petstore to ensure up-to-date * rearrange test * fix E501 * fix tests * add new files * fix script permission * fix index check * update samples
This commit is contained in:
@@ -410,9 +410,8 @@ import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure HTTP basic authorization: http_basic_test
|
||||
configuration = petstore_api.Configuration()
|
||||
# Configure HTTP basic authorization: http_basic_test
|
||||
configuration.username = 'YOUR_USERNAME'
|
||||
configuration.password = 'YOUR_PASSWORD'
|
||||
|
||||
|
||||
@@ -23,9 +23,8 @@ import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration = petstore_api.Configuration()
|
||||
# Configure API key authorization: api_key_query
|
||||
configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key_query'] = 'Bearer'
|
||||
|
||||
@@ -29,9 +29,8 @@ import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration = petstore_api.Configuration()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
@@ -80,9 +79,8 @@ import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration = petstore_api.Configuration()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
@@ -135,9 +133,8 @@ import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration = petstore_api.Configuration()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
@@ -189,9 +186,8 @@ import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration = petstore_api.Configuration()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
@@ -243,9 +239,8 @@ import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration()
|
||||
# Configure API key authorization: api_key
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
@@ -297,9 +292,8 @@ import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration = petstore_api.Configuration()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
@@ -348,9 +342,8 @@ import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration = petstore_api.Configuration()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
@@ -403,9 +396,8 @@ import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration = petstore_api.Configuration()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
@@ -459,9 +451,8 @@ import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration = petstore_api.Configuration()
|
||||
# Configure OAuth2 access token for authorization: petstore_auth
|
||||
configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# create an instance of the API class
|
||||
|
||||
@@ -73,9 +73,8 @@ import time
|
||||
import petstore_api
|
||||
from petstore_api.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# Configure API key authorization: api_key
|
||||
configuration = petstore_api.Configuration()
|
||||
# Configure API key authorization: api_key
|
||||
configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
||||
# configuration.api_key_prefix['api_key'] = 'Bearer'
|
||||
|
||||
Reference in New Issue
Block a user