swagger-ui-express
Advanced tools
Comparing version 4.6.1 to 4.6.2
@@ -142,3 +142,3 @@ 'use strict' | ||
}, 500) | ||
} | ||
@@ -258,2 +258,3 @@ } | ||
if (req.swaggerDoc) { | ||
opts.swaggerDoc = req.swaggerDoc | ||
swaggerInitFile = jsTplString.toString().replace('<% swaggerOptions %>', stringify(opts)) | ||
@@ -260,0 +261,0 @@ } |
{ | ||
"name": "swagger-ui-express", | ||
"version": "4.6.1", | ||
"version": "4.6.2", | ||
"description": "Swagger UI Express", | ||
@@ -14,3 +14,3 @@ "main": "./index.js", | ||
"scripts": { | ||
"test": "./node_modules/.bin/mocha test/*", | ||
"test": "./node_modules/.bin/mocha test/*.spec.js", | ||
"coverage:report": "nyc ./node_modules/.bin/mocha test/* || exit 0", | ||
@@ -17,0 +17,0 @@ "coverage:badge": "npm run coverage:report && istanbul-badges-readme --coverageDir='./coverage'", |
@@ -324,2 +324,7 @@ # Swagger UI Express | ||
app.use('/api-docs-two', swaggerUi.serveFiles(swaggerDocumentTwo, options), swaggerUi.setup(swaggerDocumentTwo)); | ||
app.use('/api-docs-dynamic', function(req, res, next){ | ||
req.swaggerDoc = swaggerDocument; | ||
next(); | ||
}, swaggerUi.serveFiles(), swaggerUi.setup()); | ||
``` | ||
@@ -326,0 +331,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23922
275
361