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 1.0.6 to 1.0.7

13

index.js

@@ -12,5 +12,10 @@ 'use strict'

var setup = function(swaggerDoc, explorer, options, customCss) {
var favIconHtml = '<link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32" />' +
'<link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16" />'
var setup = function(swaggerDoc, explorer, options, customCss, customfavIcon) {
options = options || {};
customCss = customCss || '';
customfavIcon = customfavIcon || false;
var html = fs.readFileSync(__dirname + '/indexTemplate.html');

@@ -24,7 +29,9 @@ try {

var explorerString = explorer ? explorerHtml : '';
var favIconString = customfavIcon ? '<link rel="icon" href="' + customfavIcon + '" />' : favIconHtml;
var explorerHtmlWithSwagger = htmlWithSwaggerReplaced.replace('<% explorerString %>', explorerString);
var indexHTML = explorerHtmlWithSwagger.replace('<% customOptions %>', JSON.stringify(options))
var htmlWithCustomCss = indexHTML.replace('<% customCss %>', customCss);
var htmlWithCustomCss = indexHTML.replace('<% customCss %>', customCss);
var htmlWithFavIcon = htmlWithCustomCss.replace('<% favIconString %>', favIconString);
return function(req, res) { res.send(htmlWithCustomCss) };
return function(req, res) { res.send(htmlWithFavIcon) };
};

@@ -31,0 +38,0 @@

{
"name": "swagger-ui-express",
"version": "1.0.6",
"version": "1.0.7",
"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