swagger-tools
Advanced tools
Comparing version 0.4.0 to 0.4.1
{ | ||
"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 @@ // ... |
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
80990
85