Pass around contextUrl correctly
This commit is contained in:
2
dist/swagger-ui-bundle.js
vendored
2
dist/swagger-ui-bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/swagger-ui.js
vendored
2
dist/swagger-ui.js
vendored
File diff suppressed because one or more lines are too long
@@ -189,9 +189,9 @@ export const executeRequest = (req) => ({fn, specActions, specSelectors}) => {
|
|||||||
let { pathName, method } = req
|
let { pathName, method } = req
|
||||||
|
|
||||||
// if url is relative, parseUrl makes it absolute by inferring from `window.location`
|
// if url is relative, parseUrl makes it absolute by inferring from `window.location`
|
||||||
let specUrl = parseUrl(specSelectors.url())
|
req.contextUrl = parseUrl(specSelectors.url()).toString()
|
||||||
|
|
||||||
let parsedRequest = Object.assign({ contextUrl: specUrl.toString() }, req)
|
let parsedRequest = Object.assign({}, req)
|
||||||
if ( pathName && method ) {
|
if ( pathName && method ) {
|
||||||
parsedRequest.operationId = method.toLowerCase() + "-" + pathName
|
parsedRequest.operationId = method.toLowerCase() + "-" + pathName
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user