forked from loafle/openapi-generator-original
Returning when query param value is null.
This commit is contained in:
@@ -246,12 +246,7 @@ public class ApiClient {
|
|||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<Pair>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty()) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
|
|
||||||
if (value == null) {
|
|
||||||
params.add(new Pair(name, ""));
|
|
||||||
return params;
|
|
||||||
}
|
|
||||||
|
|
||||||
Collection valueCollection = null;
|
Collection valueCollection = null;
|
||||||
if (value instanceof Collection) {
|
if (value instanceof Collection) {
|
||||||
|
|||||||
@@ -140,12 +140,7 @@ public class ApiInvoker {
|
|||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<Pair>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty()) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
|
|
||||||
if (value == null) {
|
|
||||||
params.add(new Pair(name, ""));
|
|
||||||
return params;
|
|
||||||
}
|
|
||||||
|
|
||||||
Collection valueCollection = null;
|
Collection valueCollection = null;
|
||||||
if (value instanceof Collection) {
|
if (value instanceof Collection) {
|
||||||
|
|||||||
@@ -140,12 +140,7 @@ public class ApiInvoker {
|
|||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<Pair>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty()) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
|
|
||||||
if (value == null) {
|
|
||||||
params.add(new Pair(name, ""));
|
|
||||||
return params;
|
|
||||||
}
|
|
||||||
|
|
||||||
Collection valueCollection = null;
|
Collection valueCollection = null;
|
||||||
if (value instanceof Collection) {
|
if (value instanceof Collection) {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package io.swagger.client.model;
|
package io.swagger.client.model;
|
||||||
|
|
||||||
import io.swagger.client.model.Category;
|
import io.swagger.client.model.Category;
|
||||||
import io.swagger.client.model.Tag;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import io.swagger.client.model.Tag;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|||||||
@@ -245,12 +245,7 @@ public class ApiClient {
|
|||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<Pair>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty()) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
|
|
||||||
if (value == null) {
|
|
||||||
params.add(new Pair(name, ""));
|
|
||||||
return params;
|
|
||||||
}
|
|
||||||
|
|
||||||
Collection valueCollection = null;
|
Collection valueCollection = null;
|
||||||
if (value instanceof Collection) {
|
if (value instanceof Collection) {
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||||
String response = apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames);
|
String response = apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames);
|
||||||
if(response != null){
|
if(response != null){
|
||||||
return (Pet) apiClient.deserialize(response, "", Pet.class);
|
return (Pet) apiClient.deserialize(response, "", Pet.class);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package io.swagger.client.model;
|
package io.swagger.client.model;
|
||||||
|
|
||||||
import io.swagger.client.model.Category;
|
import io.swagger.client.model.Category;
|
||||||
import io.swagger.client.model.Tag;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import io.swagger.client.model.Tag;
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|||||||
Reference in New Issue
Block a user