swagger-tools
Advanced tools
Comparing version 0.2.1 to 0.3.0
{ | ||
"name": "swagger-tools", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "Various tools for using and integrating with Swagger.", | ||
@@ -32,7 +32,19 @@ "main": "index.js", | ||
], | ||
"files": [ | ||
"bin", | ||
"index.js", | ||
"LICENSE", | ||
"middleware", | ||
"schemas" | ||
], | ||
"devDependencies": { | ||
"body-parser": "^1.4.3", | ||
"connect": "^3.0.2", | ||
"gulp": "^3.8.5", | ||
"gulp-jshint": "^1.6.2", | ||
"gulp-mocha": "^0.4.1", | ||
"jshint-stylish": "^0.2.0" | ||
"jshint-stylish": "^0.2.0", | ||
"qs": "^0.6.6", | ||
"string": "^1.9.0", | ||
"supertest": "^0.13.0" | ||
}, | ||
@@ -42,4 +54,6 @@ "dependencies": { | ||
"jjve": "^0.2.1", | ||
"lodash": "^2.4.1" | ||
"lodash": "^2.4.1", | ||
"parseurl": "^1.1.3", | ||
"path-to-regexp": "^0.2.3" | ||
} | ||
} |
@@ -15,2 +15,6 @@ The project provides various tools for integrating and interacting with Swagger. This project is in its infancy but | ||
declarations) _(See [Issue #1](https://github.com/apigee-127/swagger-tools/issues/1) for more details)_ | ||
* Connect middleware for using Swagger resource documents for pre-route validation | ||
* Validate the request Content-Type based on the operation's `consumes` value(s) | ||
* Validate the request parameter types | ||
* Validate the request parameter values | ||
@@ -48,2 +52,17 @@ ## Installation | ||
Here is an example of using the Swagger middleware for validating requests based on your Swagger resource documents: | ||
``` | ||
var connect = require('connect'); | ||
var petJson = require('./samples/1.2/pet.json'); | ||
var storeJson = require('./samples/1.2/user.json'); | ||
var userJson = require('./samples/1.2/store.json'); | ||
var swaggerValidator = require('swagger-tools/middleware/swagger-validator'); | ||
var app = connect(); | ||
app.use(swaggerValidator([petJson, storeJson, userJson])); | ||
// ... | ||
``` | ||
## Contributing | ||
@@ -50,0 +69,0 @@ |
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
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
77
2
77553
5
9
18
1677
+ Addedparseurl@^1.1.3
+ Addedpath-to-regexp@^0.2.3
+ Addedparseurl@1.3.3(transitive)
+ Addedpath-to-regexp@0.2.5(transitive)