File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
modules/openapi-generator/src/main/resources/python Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,16 @@ import time
44import { {{packageName} }}
55from { {{packageName} }}.rest import ApiException
66from pprint import pprint
7- { {#hasAuthMethods} }{ {#isBasic} }
7+ { {#hasAuthMethods} }
8+ configuration = { {{packageName} }}.Configuration(){ {#isBasic} }
89# Configure HTTP basic authorization: { {{name} }}
9- configuration = { {{packageName} }}.Configuration()
1010configuration.username = 'YOUR_USERNAME'
1111configuration.password = 'YOUR_PASSWORD'{ {/isBasic} }{ {#isApiKey} }
1212# Configure API key authorization: { {{name} }}
13- configuration = { {{packageName} }}.Configuration()
1413configuration.api_key['{ {{keyParamName} }}'] = 'YOUR_API_KEY'
1514# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
1615# configuration.api_key_prefix['{ {{keyParamName} }}'] = 'Bearer'{ {/isApiKey} }{ {#isOAuth} }
1716# Configure OAuth2 access token for authorization: { {{name} }}
18- configuration = { {{packageName} }}.Configuration()
1917configuration.access_token = 'YOUR_ACCESS_TOKEN'{ {/isOAuth} }
2018
2119# create an instance of the API class
Original file line number Diff line number Diff line change @@ -4,18 +4,16 @@ import time
44import { {{packageName} }}
55from { {{packageName} }}.rest import ApiException
66from pprint import pprint
7- { {#apiInfo} }{ {#apis} }{ {#-first} }{ {#operations} }{ {#operation} }{ {#-first} }{ {#hasAuthMethods} }{ {#authMethods} }{ {#isBasic} }
7+ { {#apiInfo} }{ {#apis} }{ {#-first} }{ {#operations} }{ {#operation} }{ {#-first} }{ {#hasAuthMethods} }{ {#authMethods} }
8+ configuration = { {{packageName} }}.Configuration(){ {#isBasic} }
89# Configure HTTP basic authorization: { {{name} }}
9- configuration = { {{packageName} }}.Configuration()
1010configuration.username = 'YOUR_USERNAME'
1111configuration.password = 'YOUR_PASSWORD'{ {/isBasic} }{ {#isApiKey} }
1212# Configure API key authorization: { {{name} }}
13- configuration = { {{packageName} }}.Configuration()
1413configuration.api_key['{ {{keyParamName} }}'] = 'YOUR_API_KEY'
1514# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
1615# configuration.api_key_prefix['{ {{keyParamName} }}'] = 'Bearer'{ {/isApiKey} }{ {#isOAuth} }
1716# Configure OAuth2 access token for authorization: { {{name} }}
18- configuration = { {{packageName} }}.Configuration()
1917configuration.access_token = 'YOUR_ACCESS_TOKEN'{ {/isOAuth} }{ {/authMethods} }
2018{ {/hasAuthMethods} }
2119
You can’t perform that action at this time.
0 commit comments