a127-magic
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -30,2 +30,3 @@ /**************************************************************************** | ||
var loader = require('./loader'); | ||
var resource = require('./resource'); | ||
@@ -57,2 +58,3 @@ module.exports = middleware; | ||
volosSwagger(swaggerObject, magicConfig.volos), | ||
addResourceToRequestMW(), | ||
swaggerTools.swaggerRouter(routerConfig) | ||
@@ -62,2 +64,10 @@ ]); | ||
function addResourceToRequestMW() { | ||
var a127Resource = { resource: resource }; | ||
return function(req, res, next) { | ||
req.a127 = a127Resource; | ||
next(); | ||
}; | ||
} | ||
function chain(middlewares) { | ||
@@ -64,0 +74,0 @@ |
{ | ||
"name": "a127-magic", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Apigee 127 Swagger Loader and Middleware", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
91224
502