swagger-node-express
Advanced tools
Comparing version 2.0.3 to 2.1.0
@@ -1,2 +0,1 @@ | ||
module.exports = require("./Common/node/swagger.js"), | ||
require("./Common/node/paramTypes.js"); | ||
module.exports = require("./lib/swagger.js"); |
{ | ||
"name": "swagger-node-express", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"author": { | ||
@@ -9,3 +9,3 @@ "name": "Tony Tam", | ||
}, | ||
"contributors": [ | ||
"contributors": [ | ||
{ | ||
@@ -28,5 +28,2 @@ "name": "Pauh Hill", | ||
"main": "index.js", | ||
"directories": { | ||
"lib": "./Common/node" | ||
}, | ||
"engines": { | ||
@@ -36,9 +33,18 @@ "node": ">= 0.8.x" | ||
"dependencies": { | ||
"connect": ">= 1.8.x", | ||
"lodash": "1.3.1" | ||
}, | ||
"devDependencies": { | ||
"express": "3.x", | ||
"docco": "0.4.x", | ||
"lodash": "1.3.1", | ||
"cors": "2.1.1" | ||
"cors": "2.1.1", | ||
"mocha": "~1.20.0", | ||
"should": "~4.0.0", | ||
"once": "~1.3.0", | ||
"request": "~2.36.0" | ||
}, | ||
"license": "apache 2.0" | ||
"license": "apache 2.0", | ||
"scripts": { | ||
"test": "mocha -r should './test/**/*.js'", | ||
"start": "node sample-application/app.js" | ||
} | ||
} |
# Swagger for Express and Node.js | ||
[![Build Status](https://travis-ci.org/wordnik/swagger-node-express.png)](https://travis-ci.org/wordnik/swagger-node-express) | ||
This is a [Swagger](https://github.com/wordnik/swagger-spec) module for the [Express](http://expressjs.com) web application framework for Node.js. | ||
@@ -183,2 +185,14 @@ | ||
### Error handling | ||
As of 2.1.0, swagger no longer consumes errors. The preferred way to handle errors | ||
is to use standard express middelware with an arity of 4 I.E. | ||
```javascript | ||
var app = express(); | ||
swagger.setAppHandler(app); | ||
app.use(function(err, req, res, next){ | ||
//do something with the error. | ||
}); | ||
``` | ||
### Enabling cors support using cors library | ||
@@ -185,0 +199,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
713809
1
41
9867
249
7
8
- Removedconnect@>= 1.8.x
- Removedcors@2.1.1
- Removeddocco@0.4.x
- Removedexpress@3.x
- Removedaccepts@1.2.131.3.8(transitive)
- Removedbase64-url@1.2.1(transitive)
- Removedbasic-auth@1.0.4(transitive)
- Removedbasic-auth-connect@1.0.0(transitive)
- Removedbatch@0.5.3(transitive)
- Removedbody-parser@1.13.3(transitive)
- Removedbytes@2.1.02.4.0(transitive)
- Removedcommander@13.0.02.6.0(transitive)
- Removedcompressible@2.0.18(transitive)
- Removedcompression@1.5.2(transitive)
- Removedconnect@2.30.23.7.0(transitive)
- Removedconnect-timeout@1.6.2(transitive)
- Removedcontent-disposition@0.5.0(transitive)
- Removedcontent-type@1.0.5(transitive)
- Removedcookie@0.1.3(transitive)
- Removedcookie-parser@1.3.5(transitive)
- Removedcookie-signature@1.0.6(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedcors@2.1.1(transitive)
- Removedcrc@3.3.0(transitive)
- Removedcsrf@3.0.6(transitive)
- Removedcsurf@1.8.3(transitive)
- Removeddebug@2.2.02.6.9(transitive)
- Removeddepd@1.0.11.1.22.0.0(transitive)
- Removeddestroy@1.0.31.0.4(transitive)
- Removeddocco@0.4.0(transitive)
- Removedee-first@1.1.1(transitive)
- Removedencodeurl@1.0.2(transitive)
- Removederrorhandler@1.4.3(transitive)
- Removedescape-html@1.0.21.0.3(transitive)
- Removedetag@1.7.0(transitive)
- Removedexpress@3.21.2(transitive)
- Removedexpress-session@1.11.3(transitive)
- Removedfinalhandler@0.4.01.1.2(transitive)
- Removedforwarded@0.1.2(transitive)
- Removedfresh@0.3.0(transitive)
- Removedhttp-errors@1.3.1(transitive)
- Removediconv-lite@0.4.110.4.13(transitive)
- Removedinherits@2.0.4(transitive)
- Removedipaddr.js@1.0.5(transitive)
- Removedisarray@0.0.1(transitive)
- Removedmedia-typer@0.3.0(transitive)
- Removedmerge-descriptors@1.0.0(transitive)
- Removedmethod-override@2.3.10(transitive)
- Removedmethods@1.1.2(transitive)
- Removedmime@1.3.4(transitive)
- Removedmime-db@1.52.01.53.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedminimist@0.0.8(transitive)
- Removedmkdirp@0.5.1(transitive)
- Removedmorgan@1.6.1(transitive)
- Removedms@0.7.10.7.22.0.0(transitive)
- Removedmultiparty@3.3.2(transitive)
- Removednegotiator@0.5.30.6.3(transitive)
- Removedon-finished@2.3.0(transitive)
- Removedon-headers@1.0.2(transitive)
- Removedparseurl@1.3.3(transitive)
- Removedpause@0.1.0(transitive)
- Removedproxy-addr@1.0.10(transitive)
- Removedqs@4.0.0(transitive)
- Removedrandom-bytes@1.0.0(transitive)
- Removedrange-parser@1.0.3(transitive)
- Removedraw-body@2.1.7(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedresponse-time@2.3.3(transitive)
- Removedrndm@1.2.0(transitive)
- Removedsend@0.13.00.13.2(transitive)
- Removedserve-favicon@2.3.2(transitive)
- Removedserve-index@1.7.3(transitive)
- Removedserve-static@1.10.3(transitive)
- Removedstatuses@1.2.11.5.0(transitive)
- Removedstream-counter@0.2.0(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedtsscmp@1.0.5(transitive)
- Removedtype-is@1.6.18(transitive)
- Removeduid-safe@2.0.02.1.4(transitive)
- Removedunpipe@1.0.0(transitive)
- Removedutils-merge@1.0.01.0.1(transitive)
- Removedvary@1.0.11.1.2(transitive)
- Removedvhost@3.0.2(transitive)