swagger-tools
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -22,2 +22,3 @@ /* | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var jjv = require('jjv'); | ||
@@ -70,2 +71,3 @@ var jjve = require('jjve'); | ||
var Specification = function Specification (version, options) { | ||
var schemasPath = path.join(__dirname, 'schemas', version); | ||
var docsUrl; | ||
@@ -109,3 +111,3 @@ var primitives; | ||
fs.readdirSync('./schemas/' + version) | ||
fs.readdirSync(schemasPath) | ||
.filter(function (name) { | ||
@@ -115,3 +117,3 @@ return name.match(/^(.*)\.json$/); | ||
.forEach(function (name) { | ||
this.schemas[name] = require('./schemas/' + version + '/' + name); | ||
this.schemas[name] = require(path.join(schemasPath, name)); | ||
}.bind(this)); | ||
@@ -118,0 +120,0 @@ |
@@ -62,6 +62,9 @@ /* | ||
* This middleware also requires that you use the swagger-metadata middleware before this middleware. This middleware | ||
* also makes no attempt to work around invalid Swagger documents. The routing works such that any Swagger operation is | ||
* expected to have a nickname like this: {ControllerName}#{methodName}. We will then identify the controller by name | ||
* from the controllers path (configurable) and identify the route handler within the controller by name. | ||
* also makes no attempt to work around invalid Swagger documents. If you would like to validate your requests using | ||
* the swagger-validator middleware, you must use it prior to using this middleware. | ||
* | ||
* The routing works such that any Swagger operation is expected to have a nickname like this: | ||
* {ControllerName}#{methodName}. We will then identify the controller by name from the controllers path (configurable) | ||
* and identify the route handler within the controller by name. | ||
* | ||
* @param {object} [options] - The middleware options | ||
@@ -68,0 +71,0 @@ * |
{ | ||
"name": "swagger-tools", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Various tools for using and integrating with Swagger.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
81203
1771