forked from loafle/openapi-generator-original
Replacing getClientResponseStatus() with getStatusInfo()
This commit is contained in:
@@ -421,10 +421,10 @@ public class ApiClient {
|
||||
throw new ApiException(500, "unknown method type " + method);
|
||||
}
|
||||
|
||||
if(response.getClientResponseStatus() == ClientResponse.Status.NO_CONTENT) {
|
||||
if(response.getStatusInfo() == ClientResponse.Status.NO_CONTENT) {
|
||||
return null;
|
||||
}
|
||||
else if(response.getClientResponseStatus().getFamily() == Family.SUCCESSFUL) {
|
||||
else if(response.getStatusInfo().getFamily() == Family.SUCCESSFUL) {
|
||||
if(response.hasEntity()) {
|
||||
return (String) response.getEntity(String.class);
|
||||
}
|
||||
@@ -445,7 +445,7 @@ public class ApiClient {
|
||||
}
|
||||
}
|
||||
throw new ApiException(
|
||||
response.getClientResponseStatus().getStatusCode(),
|
||||
response.getStatusInfo().getStatusCode(),
|
||||
message,
|
||||
response.getHeaders(),
|
||||
respBody);
|
||||
|
||||
@@ -420,10 +420,10 @@ public class ApiClient {
|
||||
throw new ApiException(500, "unknown method type " + method);
|
||||
}
|
||||
|
||||
if(response.getClientResponseStatus() == ClientResponse.Status.NO_CONTENT) {
|
||||
if(response.getStatusInfo() == ClientResponse.Status.NO_CONTENT) {
|
||||
return null;
|
||||
}
|
||||
else if(response.getClientResponseStatus().getFamily() == Family.SUCCESSFUL) {
|
||||
else if(response.getStatusInfo().getFamily() == Family.SUCCESSFUL) {
|
||||
if(response.hasEntity()) {
|
||||
return (String) response.getEntity(String.class);
|
||||
}
|
||||
@@ -444,7 +444,7 @@ public class ApiClient {
|
||||
}
|
||||
}
|
||||
throw new ApiException(
|
||||
response.getClientResponseStatus().getStatusCode(),
|
||||
response.getStatusInfo().getStatusCode(),
|
||||
message,
|
||||
response.getHeaders(),
|
||||
respBody);
|
||||
|
||||
@@ -322,7 +322,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
try {
|
||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
||||
String response = apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames);
|
||||
if(response != null){
|
||||
return (Pet) apiClient.deserialize(response, "", Pet.class);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import io.swagger.client.model.Category;
|
||||
import java.util.*;
|
||||
import io.swagger.client.model.Tag;
|
||||
import java.util.*;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
Reference in New Issue
Block a user