update
This commit is contained in:
@@ -41,7 +41,7 @@ window.onload = function() {
|
||||
}).observe(document, {childList: true, subtree: true});
|
||||
|
||||
const data = JSON.parse(document.getElementById('swagger-data').innerText);
|
||||
const ui = SwaggerUIBundle({
|
||||
const ui = SwaggerUIBundle(Object.assign({
|
||||
spec: data.spec,
|
||||
dom_id: '#swagger-ui',
|
||||
validatorUrl: null,
|
||||
@@ -54,7 +54,7 @@ window.onload = function() {
|
||||
SwaggerUIBundle.plugins.DownloadUrl,
|
||||
],
|
||||
layout: 'StandaloneLayout',
|
||||
});
|
||||
}, data.extraConfiguration));
|
||||
|
||||
if (data.oauth.enabled) {
|
||||
ui.initOAuth({
|
||||
@@ -63,7 +63,8 @@ window.onload = function() {
|
||||
realm: data.oauth.type,
|
||||
appName: data.spec.info.title,
|
||||
scopeSeparator: ' ',
|
||||
additionalQueryStringParams: {}
|
||||
additionalQueryStringParams: {},
|
||||
usePkceWithAuthorizationCodeGrant: data.oauth.pkce,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -148,4 +149,8 @@ window.onload = function() {
|
||||
}, 10000);
|
||||
});
|
||||
}
|
||||
|
||||
// Make SwaggerUIBundle and data available for some other scripts
|
||||
window.swaggerUI = ui;
|
||||
window.swaggerData = data;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user