From 23b81324d16adb9bacf24b7a7424e3f790a53a19 Mon Sep 17 00:00:00 2001 From: Laurynas Date: Mon, 4 Jul 2016 15:27:54 -0400 Subject: [PATCH] Python vnd content-type header support Adding vendor header support like : "Content-Type: application/vnd.api+json" and "Content-Type: application/vnd.api+json; version=1" --- modules/swagger-codegen/src/main/resources/python/rest.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/python/rest.mustache b/modules/swagger-codegen/src/main/resources/python/rest.mustache index bb3747021f5..a2e70b6ec7c 100644 --- a/modules/swagger-codegen/src/main/resources/python/rest.mustache +++ b/modules/swagger-codegen/src/main/resources/python/rest.mustache @@ -121,7 +121,7 @@ class RESTClientObject(object): if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) - if headers['Content-Type'].find('+json') != -1: + if headers['Content-Type'].find('json') != -1: request_body = None if body: request_body = json.dumps(body)