Socket
Socket
Sign inDemoInstall

swagger-ui-express

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-ui-express - npm Package Compare versions

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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc