diff --git a/modules/swagger-codegen/src/main/resources/python/configuration.mustache b/modules/swagger-codegen/src/main/resources/python/configuration.mustache index 2a26c651d7..3d2e8db228 100644 --- a/modules/swagger-codegen/src/main/resources/python/configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/python/configuration.mustache @@ -219,7 +219,7 @@ class Configuration(object): 'key': 'Authorization', 'value': self.get_basic_auth_token() }, -{{/isBasic}}{{#isOauth}} +{{/isBasic}}{{#isOAuth}} '{{name}}': { 'type': 'oauth2', @@ -227,7 +227,7 @@ class Configuration(object): 'key': 'Authorization', 'value': 'Bearer ' + self.access_token }, -{{/isOauth}}{{/authMethods}} +{{/isOAuth}}{{/authMethods}} } def to_debug_report(self): diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index 453d140f1f..891785820d 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -5,7 +5,7 @@ This Python package is automatically generated by the [Swagger Codegen](https:// - API version: 1.0.0 - Package version: 1.0.0 -- Build date: 2016-06-05T23:15:10.095+09:00 +- Build date: 2016-06-07T08:27:42.099+09:00 - Build package: class io.swagger.codegen.languages.PythonClientCodegen ## Requirements. diff --git a/samples/client/petstore/python/swagger_client/configuration.py b/samples/client/petstore/python/swagger_client/configuration.py index 50b38c61d5..5fbb46a607 100644 --- a/samples/client/petstore/python/swagger_client/configuration.py +++ b/samples/client/petstore/python/swagger_client/configuration.py @@ -221,6 +221,14 @@ class Configuration(object): :return: The Auth Settings information dict. """ return { + + 'petstore_auth': + { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + }, 'api_key': { 'type': 'api_key',