How to use the swagger-ui-dist.SwaggerUIBundle.plugins function in swagger-ui-dist

To help you get started, we’ve selected a few swagger-ui-dist examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vanilla / vanilla / plugins / swagger-ui / src / scripts / mountSwagger.ts View on Github external
export function mountSwagger() {
    SwaggerUIBundle({
        deepLinking: true,
        dom_id: "#swagger-ui",
        // layout: "DashboardLayout",
        plugins: [SwaggerUIBundle.plugins.DownloadUrl],
        presets: [SwaggerUIBundle.presets.apis],
        requestInterceptor: (request: Request) => {
            request.headers["x-transient-key"] = getMeta("TransientKey");
            return request;
        },
        url: formatUrl("/api/v2/open-api/v3" + window.location.search),
        validatorUrl: null,
    });
}

swagger-ui-dist

[![NPM version](https://badge.fury.io/js/swagger-ui-dist.svg)](http://badge.fury.io/js/swagger-ui-dist)

Apache-2.0
Latest version published 1 month ago

Package Health Score

89 / 100
Full package analysis

Similar packages