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 2.0.4 to 2.0.5

static/swagger-ui-init.js

15

index.js

@@ -21,10 +21,15 @@ 'use strict'

}
var htmlWithSwaggerReplaced = html.toString().replace('<% swaggerDoc %>', swaggerDoc ? JSON.stringify(swaggerDoc) : 'undefined');
var favIconString = customfavIcon ? '<link rel="icon" href="' + customfavIcon + '" />' : favIconHtml;
var indexHTML = htmlWithSwaggerReplaced.replace('<% customOptions %>', stringify(options))
var htmlWithCustomCss = indexHTML.replace('<% customCss %>', customCss);
var htmlWithCustomCss = html.toString().replace('<% customCss %>', customCss);
var htmlWithFavIcon = htmlWithCustomCss.replace('<% favIconString %>', favIconString);
var htmlWithSwaggerUrl = htmlWithFavIcon.replace('<% swaggerUrl %>', swaggerUrl ? '"' + swaggerUrl + '"' : 'undefined')
return function(req, res) { res.send(htmlWithSwaggerUrl) };
var initOptions = {
swaggerDoc: swaggerDoc || undefined,
customOptions: options,
swaggerUrl: swaggerUrl || undefined
}
var htmlWithOptions = htmlWithFavIcon.replace('<% swaggerOptions %>', JSON.stringify(initOptions))
return function(req, res) { res.send(htmlWithOptions) };
};

@@ -31,0 +36,0 @@

{
"name": "swagger-ui-express",
"version": "2.0.4",
"version": "2.0.5",
"description": "Swagger UI Express",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

Sorry, the diff of this file is not supported yet

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