Skip to content

Commit 1cb6eac

Browse files
authored
regenerates api client with changes for query (#30070)
1 parent 513671b commit 1cb6eac

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

ui/api-client/dist/esm/runtime.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,6 @@ export class BaseAPI {
162162
createFetchParams(context, initOverrides) {
163163
return __awaiter(this, void 0, void 0, function* () {
164164
let url = this.configuration.basePath + context.path;
165-
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
166-
// only add the querystring to the URL if there are query parameters.
167-
// this is done to avoid urls ending with a "?" character which buggy webservers
168-
// do not handle correctly sometimes.
169-
url += '?' + this.configuration.queryParamsStringify(context.query);
170-
}
171165
const headers = Object.assign({}, this.configuration.headers, context.headers);
172166
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
173167
const initOverrideFn = typeof initOverrides === "function"
@@ -183,6 +177,12 @@ export class BaseAPI {
183177
init: initParams,
184178
context,
185179
})));
180+
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
181+
// only add the querystring to the URL if there are query parameters.
182+
// this is done to avoid urls ending with a "?" character which buggy webservers
183+
// do not handle correctly sometimes.
184+
url += '?' + this.configuration.queryParamsStringify(context.query);
185+
}
186186
let body;
187187
if (isFormData(overriddenInit.body)
188188
|| (overriddenInit.body instanceof URLSearchParams)

ui/api-client/dist/runtime.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,6 @@ class BaseAPI {
170170
createFetchParams(context, initOverrides) {
171171
return __awaiter(this, void 0, void 0, function* () {
172172
let url = this.configuration.basePath + context.path;
173-
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
174-
// only add the querystring to the URL if there are query parameters.
175-
// this is done to avoid urls ending with a "?" character which buggy webservers
176-
// do not handle correctly sometimes.
177-
url += '?' + this.configuration.queryParamsStringify(context.query);
178-
}
179173
const headers = Object.assign({}, this.configuration.headers, context.headers);
180174
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
181175
const initOverrideFn = typeof initOverrides === "function"
@@ -191,6 +185,12 @@ class BaseAPI {
191185
init: initParams,
192186
context,
193187
})));
188+
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
189+
// only add the querystring to the URL if there are query parameters.
190+
// this is done to avoid urls ending with a "?" character which buggy webservers
191+
// do not handle correctly sometimes.
192+
url += '?' + this.configuration.queryParamsStringify(context.query);
193+
}
194194
let body;
195195
if (isFormData(overriddenInit.body)
196196
|| (overriddenInit.body instanceof URLSearchParams)

ui/api-client/src/runtime.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,6 @@ export class BaseAPI {
143143

144144
private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) {
145145
let url = this.configuration.basePath + context.path;
146-
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
147-
// only add the querystring to the URL if there are query parameters.
148-
// this is done to avoid urls ending with a "?" character which buggy webservers
149-
// do not handle correctly sometimes.
150-
url += '?' + this.configuration.queryParamsStringify(context.query);
151-
}
152146

153147
const headers = Object.assign({}, this.configuration.headers, context.headers);
154148
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
@@ -173,6 +167,13 @@ export class BaseAPI {
173167
}))
174168
};
175169

170+
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
171+
// only add the querystring to the URL if there are query parameters.
172+
// this is done to avoid urls ending with a "?" character which buggy webservers
173+
// do not handle correctly sometimes.
174+
url += '?' + this.configuration.queryParamsStringify(context.query);
175+
}
176+
176177
let body: any;
177178
if (isFormData(overriddenInit.body)
178179
|| (overriddenInit.body instanceof URLSearchParams)

0 commit comments

Comments
 (0)