mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 06:00:52 +00:00
Returning when query param value is null.
This commit is contained in:
parent
6958db3d3d
commit
b4d6fd3ba3
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user