swagger-ui-express
Advanced tools
Comparing version 3.0.0 to 3.0.1
12
index.js
@@ -46,11 +46,5 @@ 'use strict' | ||
} | ||
var htmlWithOptions = htmlWithCustomJs.replace('<% title %>', customeSiteTitle) | ||
var htmlWithOptions = htmlWithCustomJs.replace('<% swaggerOptions %>', JSON.stringify(initOptions)).replace('<% title %>', customeSiteTitle) | ||
var js = fs.readFileSync(__dirname + '/swagger-ui-init.js'); | ||
swaggerInit = js.toString().replace('<% swaggerOptions %>', stringify(initOptions)) | ||
return function (req, res) { | ||
res.send(htmlWithOptions) | ||
}; | ||
return function (req, res) { res.send(htmlWithOptions) }; | ||
}; | ||
@@ -66,3 +60,3 @@ | ||
var serve = [swaggerInit, express.static(__dirname + '/static')]; | ||
var serve = express.static(__dirname + '/static'); | ||
@@ -69,0 +63,0 @@ var stringify = function (obj, prop) { |
{ | ||
"name": "swagger-ui-express", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Swagger UI Express", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is not supported yet
15285325
14
7464