forked from loafle/openapi-generator-original
[Python] 5094 followup - Reduce redundancy in docs (#5161)
* Reduce redundancy in python docs This is a followup to PR #5094, which had a few unresolved comments at merge time. This reduces the amount of redundant lines in the api example doc templates, and ensures that referenced Configuration objects are actually instantiated. * Regenerate samples
This commit is contained in:
committed by
GitHub
parent
197cea3248
commit
c943ecfe28
@@ -482,6 +482,7 @@ configuration.password = 'YOUR_PASSWORD'
|
||||
|
||||
# Defining host is optional and default to http://petstore.swagger.io:80/v2
|
||||
configuration.host = "http://petstore.swagger.io:80/v2"
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
|
||||
@@ -31,6 +31,7 @@ configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
|
||||
|
||||
# Defining host is optional and default to http://petstore.swagger.io:80/v2
|
||||
configuration.host = "http://petstore.swagger.io:80/v2"
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
|
||||
@@ -35,6 +35,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# Defining host is optional and default to http://petstore.swagger.io:80/v2
|
||||
configuration.host = "http://petstore.swagger.io:80/v2"
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
@@ -95,6 +96,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# Defining host is optional and default to http://petstore.swagger.io:80/v2
|
||||
configuration.host = "http://petstore.swagger.io:80/v2"
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
@@ -159,6 +161,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# Defining host is optional and default to http://petstore.swagger.io:80/v2
|
||||
configuration.host = "http://petstore.swagger.io:80/v2"
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
@@ -222,6 +225,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# Defining host is optional and default to http://petstore.swagger.io:80/v2
|
||||
configuration.host = "http://petstore.swagger.io:80/v2"
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
@@ -287,6 +291,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Defining host is optional and default to http://petstore.swagger.io:80/v2
|
||||
configuration.host = "http://petstore.swagger.io:80/v2"
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
@@ -349,6 +354,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# Defining host is optional and default to http://petstore.swagger.io:80/v2
|
||||
configuration.host = "http://petstore.swagger.io:80/v2"
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
@@ -411,6 +417,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# Defining host is optional and default to http://petstore.swagger.io:80/v2
|
||||
configuration.host = "http://petstore.swagger.io:80/v2"
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
@@ -474,6 +481,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# Defining host is optional and default to http://petstore.swagger.io:80/v2
|
||||
configuration.host = "http://petstore.swagger.io:80/v2"
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
@@ -538,6 +546,7 @@ configuration.access_token = 'YOUR_ACCESS_TOKEN'
|
||||
|
||||
# Defining host is optional and default to http://petstore.swagger.io:80/v2
|
||||
configuration.host = "http://petstore.swagger.io:80/v2"
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
|
||||
@@ -90,6 +90,7 @@ configuration.api_key['api_key'] = 'YOUR_API_KEY'
|
||||
|
||||
# Defining host is optional and default to http://petstore.swagger.io:80/v2
|
||||
configuration.host = "http://petstore.swagger.io:80/v2"
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
|
||||
Reference in New Issue
Block a user