From 1cb6eacacadc08dd0d1b3219775be9da4cb4d9fc Mon Sep 17 00:00:00 2001 From: Jordan Reimer Date: Fri, 28 Mar 2025 13:26:04 -0600 Subject: [PATCH] regenerates api client with changes for query (#30070) --- ui/api-client/dist/esm/runtime.js | 12 ++++++------ ui/api-client/dist/runtime.js | 12 ++++++------ ui/api-client/src/runtime.ts | 13 +++++++------ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/ui/api-client/dist/esm/runtime.js b/ui/api-client/dist/esm/runtime.js index b896f9d5be..e97c31dfb4 100644 --- a/ui/api-client/dist/esm/runtime.js +++ b/ui/api-client/dist/esm/runtime.js @@ -162,12 +162,6 @@ export class BaseAPI { createFetchParams(context, initOverrides) { return __awaiter(this, void 0, void 0, function* () { let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } const headers = Object.assign({}, this.configuration.headers, context.headers); Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); const initOverrideFn = typeof initOverrides === "function" @@ -183,6 +177,12 @@ export class BaseAPI { init: initParams, context, }))); + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } let body; if (isFormData(overriddenInit.body) || (overriddenInit.body instanceof URLSearchParams) diff --git a/ui/api-client/dist/runtime.js b/ui/api-client/dist/runtime.js index f11f5ee07f..c4bc1ced95 100644 --- a/ui/api-client/dist/runtime.js +++ b/ui/api-client/dist/runtime.js @@ -170,12 +170,6 @@ class BaseAPI { createFetchParams(context, initOverrides) { return __awaiter(this, void 0, void 0, function* () { let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } const headers = Object.assign({}, this.configuration.headers, context.headers); Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); const initOverrideFn = typeof initOverrides === "function" @@ -191,6 +185,12 @@ class BaseAPI { init: initParams, context, }))); + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } let body; if (isFormData(overriddenInit.body) || (overriddenInit.body instanceof URLSearchParams) diff --git a/ui/api-client/src/runtime.ts b/ui/api-client/src/runtime.ts index aad290a08b..cd36b6381a 100644 --- a/ui/api-client/src/runtime.ts +++ b/ui/api-client/src/runtime.ts @@ -143,12 +143,6 @@ export class BaseAPI { private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } const headers = Object.assign({}, this.configuration.headers, context.headers); Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); @@ -173,6 +167,13 @@ export class BaseAPI { })) }; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } + let body: any; if (isFormData(overriddenInit.body) || (overriddenInit.body instanceof URLSearchParams)