From df695ee2c47d0b69eb2330dc229ef5870ef14ee5 Mon Sep 17 00:00:00 2001 From: Laurynas Date: Mon, 4 Jul 2016 15:22: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 1a6cf193b6c..bb3747021f5 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'] == 'application/json': + if headers['Content-Type'].find('+json') != -1: request_body = None if body: request_body = json.dumps(body)