Skip to content

Commit

Permalink
fix bug in query collection parameters (OpenAPITools#10768)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Nov 3, 2021
1 parent edb88d9 commit 9d1420d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,12 @@ public Call buildCall(String path, String method, List<Pair> queryParams, List<P
* @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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,12 @@ public Call buildCall(String path, String method, List<Pair> queryParams, List<P
* @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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,12 @@ public Call buildCall(String path, String method, List<Pair> queryParams, List<P
* @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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,12 @@ public Call buildCall(String path, String method, List<Pair> queryParams, List<P
* @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);
Expand Down

0 comments on commit 9d1420d

Please sign in to comment.