swagger-node-express
Advanced tools
+6
-6
@@ -7,8 +7,8 @@ var params = require('./paramTypes'); | ||
| module.exports.params = params; | ||
| exports.queryParam = params.query; | ||
| exports.pathParam = params.path; | ||
| exports.bodyParam = params.body; | ||
| exports.formParam = params.form; | ||
| exports.headerParam = params.header; | ||
| exports.error = errorHandling.error; | ||
| module.exports.queryParam = params.query; | ||
| module.exports.pathParam = params.path; | ||
| module.exports.bodyParam = params.body; | ||
| module.exports.formParam = params.form; | ||
| module.exports.headerParam = params.header; | ||
| module.exports.error = errorHandling.error; | ||
+1
-1
| { | ||
| "name": "swagger-node-express", | ||
| "version": "2.1.1", | ||
| "version": "2.1.2", | ||
| "author": { | ||
@@ -5,0 +5,0 @@ "name": "Tony Tam", |
+6
-0
@@ -171,2 +171,8 @@ # Swagger for Express and Node.js | ||
| Be sure to set your `basePath` correctly to reflect this subpath: | ||
| ``` | ||
| swagger.configure("http://petstore.swagger.wordnik.com/v1", "0.1"); | ||
| ``` | ||
| Now swagger and all apis configured through it will live under the `/v1` path (i.e. `/v1/api-docs`). | ||
@@ -173,0 +179,0 @@ |
@@ -6,3 +6,24 @@ 'use strict'; | ||
| require('../'); | ||
| }); | ||
| }); | ||
| it('should have params object', function() { | ||
| require('../').should.have.property('params').and.should.be.type('object'); | ||
| }); | ||
| it('should have queryParam function', function() { | ||
| require('../').should.have.property('queryParam').and.should.be.type('object'); | ||
| }); | ||
| it('should have pathParam function', function() { | ||
| require('../').should.have.property('pathParam').and.should.be.type('object'); | ||
| }); | ||
| it('should have bodyParam function', function() { | ||
| require('../').should.have.property('bodyParam').and.should.be.type('object'); | ||
| }); | ||
| it('should have formParam function', function() { | ||
| require('../').should.have.property('formParam').and.should.be.type('object'); | ||
| }); | ||
| it('should have headerParam function', function() { | ||
| require('../').should.have.property('headerParam').and.should.be.type('object'); | ||
| }); | ||
| it('should have error function', function() { | ||
| require('../').should.have.property('error').and.should.be.type('object'); | ||
| }); | ||
| }); |
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 3 instances in 1 package
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
816090
0.14%12931
0.16%255
2.41%