[swagger-ui-express] fix swagger options key (#43214)

This commit is contained in:
Anton Kudinov 2020-03-20 17:37:43 +02:00 committed by GitHub
parent 1754e384f4
commit 00d193f1a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -24,7 +24,7 @@ export interface SwaggerUiOptions {
customSiteTitle?: string;
explorer?: boolean;
isExplorer?: boolean;
options?: SwaggerOptions;
swaggerOptions?: SwaggerOptions;
swaggerUrl?: string;
swaggerUrls?: string[];
}

View File

@ -87,3 +87,11 @@ app.get(
const swaggerHtml = swaggerUi.generateHTML(swaggerDocument, swaggerUiOpts);
app.use('/api-docs-html1', swaggerUi.serveFiles(swaggerDocument, swaggerUiOpts));
const uiOptsWithSwaggerOpts = {
swaggerOptions: {
validatorUrl: null
}
};
swaggerUi.setup(swaggerDocument, uiOptsWithSwaggerOpts);