swagger-node-express
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -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; | ||
{ | ||
"name": "swagger-node-express", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "Tony Tam", |
@@ -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'); | ||
}); | ||
}); |
816090
12931
255