From b050ba9dc3536f173a7b93d91a309603f4e709aa Mon Sep 17 00:00:00 2001 From: Zoltan Biro Date: Mon, 29 Aug 2016 16:47:22 +0200 Subject: [PATCH] regenerate petstore sample --- samples/client/petstore/python/README.md | 2 +- samples/client/petstore/python/petstore_api/api_client.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index db827de9ceb2..3f9cea1e35aa 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-08-22T17:54:52.358+08:00 +- Build date: 2016-08-29T16:39:50.642+02:00 - Build package: class io.swagger.codegen.languages.PythonClientCodegen ## Requirements. diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index ddfaf2ca7440..8fb86fc09644 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -581,6 +581,9 @@ class ApiClient(object): """ instance = klass() + if not instance.swagger_types: + return data + for attr, attr_type in iteritems(instance.swagger_types): if data is not None \ and instance.attribute_map[attr] in data\