forked from loafle/openapi-generator-original
[JAVA] use query parameter apikey if present (#19334)
* Fix #16362 * Update samples * Undo formatting changes * Revert whitespace changes in samples * make it work --------- Co-authored-by: Jason Boileau <jason@boileau.dk> Co-authored-by: Jason Boileau <spraot@users.noreply.github.com>
This commit is contained in:
parent
d55525fbc4
commit
58dd0305ce
@ -1450,10 +1450,6 @@ public class ApiClient {
|
||||
* @throws {{invokerPackage}}.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1481,10 +1477,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1267,10 +1267,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1298,10 +1294,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1197,10 +1197,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1228,10 +1224,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1171,10 +1171,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1202,10 +1198,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1194,10 +1194,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1225,10 +1221,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1267,10 +1267,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1298,10 +1294,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1287,10 +1287,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1318,10 +1314,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1272,10 +1272,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1303,10 +1299,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1267,10 +1267,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1298,10 +1294,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1270,10 +1270,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1301,10 +1297,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1273,10 +1273,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1304,10 +1300,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1267,10 +1267,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1298,10 +1294,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1267,10 +1267,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1298,10 +1294,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
@ -1341,10 +1341,6 @@ public class ApiClient {
|
||||
* @throws org.openapitools.client.ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String baseUrl, 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 {
|
||||
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
|
||||
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
|
||||
allQueryParams.addAll(collectionQueryParams);
|
||||
|
||||
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
|
||||
|
||||
// prepare HTTP request body
|
||||
@ -1372,10 +1368,12 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(url);
|
||||
// update parameters with authentication settings
|
||||
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
|
||||
|
||||
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
|
||||
processHeaderParams(headerParams, reqBuilder);
|
||||
processCookieParams(cookieParams, reqBuilder);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user