Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of API Explorer Query Params into release/1.12.x #18753

Merged
merged 1 commit into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/18743.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: fixes query parameters not passed in api explorer test requests
```
4 changes: 2 additions & 2 deletions ui/lib/open-api-explorer/addon/components/swagger-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ const CONFIG = (SwaggerUIBundle, componentInstance, initialFilter) => {
// we want to link to the right JSON in swagger UI so
// it's already been pre-pended
if (!req.loadSpec) {
let { protocol, host, pathname } = parseURL(req.url);
const { protocol, host, pathname, search } = parseURL(req.url);
//paths in the spec don't have /v1 in them, so we need to add that here
// http(s): vlt.io:4200 /sys/mounts
req.url = `${protocol}//${host}/v1${pathname}`;
req.url = `${protocol}//${host}/v1${pathname}${search}`;
}
return req;
},
Expand Down