From 3c919974a7d622967b5657f418ff40717c8a9c49 Mon Sep 17 00:00:00 2001 From: Takuro Wada Date: Tue, 7 Jun 2016 08:30:17 +0900 Subject: [PATCH] Fix 'isOauth' to 'isOAuth' in python template --- .../src/main/resources/python/configuration.mustache | 4 ++-- samples/client/petstore/python/README.md | 2 +- .../petstore/python/swagger_client/configuration.py | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/python/configuration.mustache b/modules/swagger-codegen/src/main/resources/python/configuration.mustache index 2a26c651d7d..3d2e8db228b 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 453d140f1f7..891785820de 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 50b38c61d56..5fbb46a607f 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',