@useoptic/document-sails
An Optic fixture for documenting Sails JS
Last updated 8 months ago by acunniffe .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @useoptic/document-sails 
SYNC missed versions from official npm registry.

Using Optic with Sails

Optic's documenting middleware for Sails.

Usage

Install the node module from npm:

npm install @useoptic/document-sails

Add the Optic documenting middleware to config/http.js. The middleware will be skipped by default and will never run in production. It only runs when your tests were started by optic api:document. Every HTTP request your run to test your API will be used by Optic to infer the current API contract.

module.exports.http = {

  middleware: {
  	order: [
      'cookieParser',
      'session',
      'bodyParser',
      'compress',
      'poweredBy',
      'documentSails', //Optic always goes just before router
      'router',
      'www',
      'favicon'
  	], 	
  	
  	documentSails: require('@useoptic/document-sails') //import middleware from package
  	
  }
}

Current Tags

  • 0.1.2                                ...           latest (8 months ago)

3 Versions

  • 0.1.2                                ...           8 months ago
  • 0.1.1                                ...           8 months ago
  • 0.1.0                                ...           8 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |