Socket
Socket
Sign inDemoInstall

swagger-tools

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-tools - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

bin/swagger-validator

20

package.json
{
"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 @@

.jshintrc
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