Skip to content

Commit

Permalink
return a null instead of application/json when no content types are s…
Browse files Browse the repository at this point in the history
…et (OpenAPITools#5941)

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

* update petstore sample

Co-authored-by: William Cheng <[email protected]>
  • Loading branch information
2 people authored and michaelpro1 committed May 7, 2020
1 parent c5e5e65 commit a387205
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ namespace {{packageName}}.Client
public static String SelectHeaderContentType(String[] contentTypes)
{
if (contentTypes.Length == 0)
return "application/json";
return null;
foreach (var contentType in contentTypes)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public static byte[] ReadAsBytes(Stream inputStream)
public static String SelectHeaderContentType(String[] contentTypes)
{
if (contentTypes.Length == 0)
return "application/json";
return null;

foreach (var contentType in contentTypes)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public static byte[] ReadAsBytes(Stream inputStream)
public static String SelectHeaderContentType(String[] contentTypes)
{
if (contentTypes.Length == 0)
return "application/json";
return null;

foreach (var contentType in contentTypes)
{
Expand Down

0 comments on commit a387205

Please sign in to comment.