mirror of https://gitlab.com/tildes/tildes.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
697 B
26 lines
697 B
window.onload = function() {
|
|
const uiConfig = {
|
|
"url": "/api/beta/openapi.yaml",
|
|
"dom_id": "#swagger-ui",
|
|
"deepLinking": true,
|
|
"validatorUrl": null,
|
|
"layout": "StandaloneLayout",
|
|
"oauth2RedirectUrl": "/api/beta/ui/oauth2-redirect"
|
|
};
|
|
Object.assign(uiConfig, {
|
|
presets: [
|
|
SwaggerUIBundle.presets.apis,
|
|
SwaggerUIStandalonePreset,
|
|
],
|
|
plugins: [
|
|
SwaggerUIBundle.plugins.DownloadUrl,
|
|
],
|
|
});
|
|
const oauthConfig = null;
|
|
// Build a system
|
|
const ui = SwaggerUIBundle(uiConfig);
|
|
if (oauthConfig) {
|
|
ui.initOAuth(oauthConfig);
|
|
}
|
|
window.ui = ui;
|
|
}
|