return a null instead of application/json when no content types are set (#5941)

* return a null instead of application/json when no content types are set

* update petstore sample

Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
Fabian Freund 2020-04-18 03:57:18 +02:00 committed by GitHub
parent cb50ad590f
commit e47739dda5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -169,7 +169,7 @@ namespace {{packageName}}.Client
public static String SelectHeaderContentType(String[] contentTypes) public static String SelectHeaderContentType(String[] contentTypes)
{ {
if (contentTypes.Length == 0) if (contentTypes.Length == 0)
return "application/json"; return null;
foreach (var contentType in contentTypes) foreach (var contentType in contentTypes)
{ {

View File

@ -174,7 +174,7 @@ namespace Org.OpenAPITools.Client
public static String SelectHeaderContentType(String[] contentTypes) public static String SelectHeaderContentType(String[] contentTypes)
{ {
if (contentTypes.Length == 0) if (contentTypes.Length == 0)
return "application/json"; return null;
foreach (var contentType in contentTypes) foreach (var contentType in contentTypes)
{ {

View File

@ -174,7 +174,7 @@ namespace Org.OpenAPITools.Client
public static String SelectHeaderContentType(String[] contentTypes) public static String SelectHeaderContentType(String[] contentTypes)
{ {
if (contentTypes.Length == 0) if (contentTypes.Length == 0)
return "application/json"; return null;
foreach (var contentType in contentTypes) foreach (var contentType in contentTypes)
{ {