mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-28 11:40:52 +00:00
update java petstore (okhttp-gson) samples
This commit is contained in:
parent
86f2ea5e3e
commit
646c2bc23c
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user