Skip to content

Commit 70005a2

Browse files
committed
Merge pull request #3066 from taxpon/issue-3064-python-configuration-bug
Fix 'isOauth' to 'isOAuth' in python template
2 parents dd52f01 + 3c91997 commit 70005a2

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

modules/swagger-codegen/src/main/resources/python/configuration.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,15 @@ class Configuration(object):
219219
'key': 'Authorization',
220220
'value': self.get_basic_auth_token()
221221
},
222-
{{/isBasic}}{{#isOauth}}
222+
{{/isBasic}}{{#isOAuth}}
223223
'{{name}}':
224224
{
225225
'type': 'oauth2',
226226
'in': 'header',
227227
'key': 'Authorization',
228228
'value': 'Bearer ' + self.access_token
229229
},
230-
{{/isOauth}}{{/authMethods}}
230+
{{/isOAuth}}{{/authMethods}}
231231
}
232232

233233
def to_debug_report(self):

samples/client/petstore/python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This Python package is automatically generated by the [Swagger Codegen](https://
55

66
- API version: 1.0.0
77
- Package version: 1.0.0
8-
- Build date: 2016-06-05T23:15:10.095+09:00
8+
- Build date: 2016-06-07T08:27:42.099+09:00
99
- Build package: class io.swagger.codegen.languages.PythonClientCodegen
1010

1111
## Requirements.

samples/client/petstore/python/swagger_client/configuration.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,14 @@ def auth_settings(self):
221221
:return: The Auth Settings information dict.
222222
"""
223223
return {
224+
225+
'petstore_auth':
226+
{
227+
'type': 'oauth2',
228+
'in': 'header',
229+
'key': 'Authorization',
230+
'value': 'Bearer ' + self.access_token
231+
},
224232
'api_key':
225233
{
226234
'type': 'api_key',

0 commit comments

Comments
 (0)