Package Exports
- swaggerize-restify
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (swaggerize-restify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
swaggerize-restify
swaggerize-restify
is a fork of excellent swaggerize-express, with some fixes to work with Restify.
Quick Start
The quickest way to get up and running with swaggerize-restify
is to follow swaggerize-express documentation: Quick Start with a Generator. After you have generated new swaggerize-express
project, all you need to do is to install swaggerize-restify
:
$ npm install swaggerize-restify
And use properly modified server.js
file:
var restify = require('restify');
var swaggerize = require('swaggerize-restify');
var path = require('path');
var server = restify.createServer();
server.use(restify.bodyParser());
swaggerize(server, {
api: path.resolve('./config/petstore.json'),
handlers: path.resolve('./handlers')
});
server.listen(8000, 'localhost', function () {
server.swagger.api.host = server.address().address + ':' + server.address().port;
});