JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q43052F

Design-first REST services with Swagger and Restify (forked from the excellent package written by Trevor Livingston: https://github.com/krakenjs/swaggerize-express).

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

Build Status

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;
});