swagger-ui-express
Advanced tools
Comparing version 4.1.2 to 4.1.3
16
index.js
@@ -136,3 +136,3 @@ 'use strict' | ||
var generateHTML = function (swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customeSiteTitle, _htmlTplString, _jsTplString) { | ||
var generateHTML = function (swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customSiteTitle, _htmlTplString, _jsTplString) { | ||
var isExplorer | ||
@@ -150,3 +150,3 @@ var customJs | ||
isExplorer = opts.explorer || !!swaggerUrls | ||
customeSiteTitle = opts.customSiteTitle | ||
customSiteTitle = opts.customSiteTitle | ||
customCssUrl = opts.customCssUrl | ||
@@ -161,3 +161,3 @@ } else { | ||
customfavIcon = customfavIcon || false | ||
customeSiteTitle = customeSiteTitle || 'Swagger UI' | ||
customSiteTitle = customSiteTitle || 'Swagger UI' | ||
_htmlTplString = _htmlTplString || htmlTplString | ||
@@ -180,10 +180,10 @@ _jsTplString = _jsTplString || jsTplString | ||
swaggerInit = _jsTplString.toString().replace('<% swaggerOptions %>', stringify(initOptions)) | ||
return htmlWithCustomCssUrl.replace('<% title %>', customeSiteTitle) | ||
return htmlWithCustomCssUrl.replace('<% title %>', customSiteTitle) | ||
} | ||
var setup = function (swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customeSiteTitle) { | ||
var html = generateHTML(swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customeSiteTitle, htmlTplString, jsTplString) | ||
var setup = function (swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customSiteTitle) { | ||
var html = generateHTML(swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customSiteTitle, htmlTplString, jsTplString) | ||
return function (req, res) { | ||
if (req.swaggerDoc) { | ||
var reqHtml = generateHTML(req.swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customeSiteTitle, htmlTplString, jsTplString) | ||
var reqHtml = generateHTML(req.swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customSiteTitle, htmlTplString, jsTplString) | ||
res.send(reqHtml) | ||
@@ -196,3 +196,3 @@ } else { | ||
var swaggerInitFn = function (req, res, next) { | ||
function swaggerInitFn(req, res, next) { | ||
if (req.url === '/swagger-ui-init.js') { | ||
@@ -199,0 +199,0 @@ res.set('Content-Type', 'application/javascript') |
{ | ||
"name": "swagger-ui-express", | ||
"version": "4.1.2", | ||
"version": "4.1.3", | ||
"description": "Swagger UI Express", | ||
@@ -50,3 +50,6 @@ "main": "./index.js", | ||
"swagger-ui-dist": "^3.18.1" | ||
}, | ||
"peerDependencies": { | ||
"express": ">=4.0.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
18223
2