mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-05 18:06:08 +00:00
update java petstore (okhttp-gson) samples
This commit is contained in:
@@ -590,11 +590,11 @@ public class ApiClient {
|
||||
*
|
||||
* @param contentTypes The Content-Type array to select from
|
||||
* @return The Content-Type header to use. If the given array is empty,
|
||||
* JSON will be used.
|
||||
* or matches "any", JSON will be used.
|
||||
*/
|
||||
public String selectHeaderContentType(String[] contentTypes) {
|
||||
if (contentTypes.length == 0) {
|
||||
return "application/json";
|
||||
if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) {
|
||||
return "application/json";
|
||||
}
|
||||
for (String contentType : contentTypes) {
|
||||
if (isJsonMime(contentType)) {
|
||||
|
||||
@@ -590,11 +590,11 @@ public class ApiClient {
|
||||
*
|
||||
* @param contentTypes The Content-Type array to select from
|
||||
* @return The Content-Type header to use. If the given array is empty,
|
||||
* JSON will be used.
|
||||
* or matches "any", JSON will be used.
|
||||
*/
|
||||
public String selectHeaderContentType(String[] contentTypes) {
|
||||
if (contentTypes.length == 0) {
|
||||
return "application/json";
|
||||
if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) {
|
||||
return "application/json";
|
||||
}
|
||||
for (String contentType : contentTypes) {
|
||||
if (isJsonMime(contentType)) {
|
||||
|
||||
Reference in New Issue
Block a user