diff --git a/types/swagger-ui-express/index.d.ts b/types/swagger-ui-express/index.d.ts index 956d132b1e..2c007106ae 100644 --- a/types/swagger-ui-express/index.d.ts +++ b/types/swagger-ui-express/index.d.ts @@ -24,7 +24,7 @@ export interface SwaggerUiOptions { customSiteTitle?: string; explorer?: boolean; isExplorer?: boolean; - options?: SwaggerOptions; + swaggerOptions?: SwaggerOptions; swaggerUrl?: string; swaggerUrls?: string[]; } diff --git a/types/swagger-ui-express/swagger-ui-express-tests.ts b/types/swagger-ui-express/swagger-ui-express-tests.ts index e1ca950119..30dae05c2d 100644 --- a/types/swagger-ui-express/swagger-ui-express-tests.ts +++ b/types/swagger-ui-express/swagger-ui-express-tests.ts @@ -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);