mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-24 16:11:08 +02:00
regenerates api client with changes for query (#30070)
This commit is contained in:
parent
513671b72c
commit
1cb6eacaca
12
ui/api-client/dist/esm/runtime.js
vendored
12
ui/api-client/dist/esm/runtime.js
vendored
@ -162,12 +162,6 @@ export class BaseAPI {
|
|||||||
createFetchParams(context, initOverrides) {
|
createFetchParams(context, initOverrides) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
let url = this.configuration.basePath + context.path;
|
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);
|
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
||||||
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
|
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
|
||||||
const initOverrideFn = typeof initOverrides === "function"
|
const initOverrideFn = typeof initOverrides === "function"
|
||||||
@ -183,6 +177,12 @@ export class BaseAPI {
|
|||||||
init: initParams,
|
init: initParams,
|
||||||
context,
|
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;
|
let body;
|
||||||
if (isFormData(overriddenInit.body)
|
if (isFormData(overriddenInit.body)
|
||||||
|| (overriddenInit.body instanceof URLSearchParams)
|
|| (overriddenInit.body instanceof URLSearchParams)
|
||||||
|
12
ui/api-client/dist/runtime.js
vendored
12
ui/api-client/dist/runtime.js
vendored
@ -170,12 +170,6 @@ class BaseAPI {
|
|||||||
createFetchParams(context, initOverrides) {
|
createFetchParams(context, initOverrides) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
let url = this.configuration.basePath + context.path;
|
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);
|
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
||||||
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
|
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
|
||||||
const initOverrideFn = typeof initOverrides === "function"
|
const initOverrideFn = typeof initOverrides === "function"
|
||||||
@ -191,6 +185,12 @@ class BaseAPI {
|
|||||||
init: initParams,
|
init: initParams,
|
||||||
context,
|
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;
|
let body;
|
||||||
if (isFormData(overriddenInit.body)
|
if (isFormData(overriddenInit.body)
|
||||||
|| (overriddenInit.body instanceof URLSearchParams)
|
|| (overriddenInit.body instanceof URLSearchParams)
|
||||||
|
@ -143,12 +143,6 @@ export class BaseAPI {
|
|||||||
|
|
||||||
private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) {
|
private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) {
|
||||||
let url = this.configuration.basePath + context.path;
|
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);
|
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
||||||
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
|
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;
|
let body: any;
|
||||||
if (isFormData(overriddenInit.body)
|
if (isFormData(overriddenInit.body)
|
||||||
|| (overriddenInit.body instanceof URLSearchParams)
|
|| (overriddenInit.body instanceof URLSearchParams)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user