From 10aa68c6b7243800b8419aeb24a9e86debb07a55 Mon Sep 17 00:00:00 2001 From: Zoltan Biro Date: Mon, 29 Aug 2016 16:08:45 +0200 Subject: [PATCH] Fix empty model object serialization in python client --- .../src/main/resources/python/api_client.mustache | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/swagger-codegen/src/main/resources/python/api_client.mustache b/modules/swagger-codegen/src/main/resources/python/api_client.mustache index e75c6be52ed..2ea9b2299cc 100644 --- a/modules/swagger-codegen/src/main/resources/python/api_client.mustache +++ b/modules/swagger-codegen/src/main/resources/python/api_client.mustache @@ -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\