fix bug in query collection parameters (#10768)

This commit is contained in:
William Cheng
2021-11-03 22:13:33 +08:00
committed by GitHub
parent edb88d9193
commit 9d1420dc94
5 changed files with 30 additions and 5 deletions

View File

@@ -1316,7 +1316,12 @@ public class ApiClient {
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
*/
public Request buildRequest(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String[] authNames, ApiCallback callback) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
allQueryParams.addAll(collectionQueryParams);
// update parameters with authentication settings
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams);
final String url = buildUrl(path, queryParams, collectionQueryParams);
final Request.Builder reqBuilder = new Request.Builder().url(url);

View File

@@ -1118,7 +1118,12 @@ public class ApiClient {
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
*/
public Request buildRequest(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String[] authNames, ApiCallback callback) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
allQueryParams.addAll(collectionQueryParams);
// update parameters with authentication settings
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams);
final String url = buildUrl(path, queryParams, collectionQueryParams);
final Request.Builder reqBuilder = new Request.Builder().url(url);

View File

@@ -1182,7 +1182,12 @@ public class ApiClient {
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
*/
public Request buildRequest(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String[] authNames, ApiCallback callback) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
allQueryParams.addAll(collectionQueryParams);
// update parameters with authentication settings
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams);
final String url = buildUrl(path, queryParams, collectionQueryParams);
final Request.Builder reqBuilder = new Request.Builder().url(url);

View File

@@ -1183,7 +1183,12 @@ public class ApiClient {
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
*/
public Request buildRequest(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String[] authNames, ApiCallback callback) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
allQueryParams.addAll(collectionQueryParams);
// update parameters with authentication settings
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams);
final String url = buildUrl(path, queryParams, collectionQueryParams);
final Request.Builder reqBuilder = new Request.Builder().url(url);

View File

@@ -1183,7 +1183,12 @@ public class ApiClient {
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
*/
public Request buildRequest(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String[] authNames, ApiCallback callback) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
allQueryParams.addAll(collectionQueryParams);
// update parameters with authentication settings
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams);
final String url = buildUrl(path, queryParams, collectionQueryParams);
final Request.Builder reqBuilder = new Request.Builder().url(url);