Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.4.0 to 0.4.1

2

package.json
{
"name": "swagger-tools",
"version": "0.4.0",
"version": "0.4.1",
"description": "Various tools for using and integrating with Swagger.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -15,3 +15,5 @@ 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
* Connect middleware for adding pertinent Swagger information to your requests (swagger-metadata)
* Connect middleware for wiring request handlers to requests based on Swagger documentation (swagger-router)
* Connect middleware for using Swagger resource documents for pre-route validation (swagger-validator)
* Validate the request Content-Type based on the operation's `consumes` value(s)

@@ -57,8 +59,14 @@ * Validate the request parameter types

var petJson = require('./samples/1.2/pet.json');
var resourceListing = require('./samples/1.2/resource-listing.json');
var storeJson = require('./samples/1.2/user.json');
var userJson = require('./samples/1.2/store.json');
var swaggerMetadata = require('swagger-tools/middleware/swagger-metadata');
var swaggerRouter = require('swagger-tools/middleware/swagger-router');
var swaggerValidator = require('swagger-tools/middleware/swagger-validator');
var app = connect();
app.use(swaggerValidator([petJson, storeJson, userJson]));
// More coming on this shortly
app.use(swaggerMetadata(resourceListing, [petJson, storeJson, userJson]));
app.use(swaggerRouter({useStubs: true, controllers: '/Users/jwhitlock/projects/awesome/api/controllers'}));
app.use(swaggerValidator());

@@ -65,0 +73,0 @@ // ...

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