This middleware is used by the Swagger project. It is designed to handle all your Open API-driven project needs with minimal fuss - and maximal flexibility.
This is primarily a wrapper for the swagger-node-runner project. Be sure to follow that project and read the release notes there!
This hook will automatically be installed and used when creating a Sails application through the Swagger cli.
To add to an existing Sails app:
- Install module as a dependency in your app:
npm install --save swagger-sails-hook
- Create a directory called api/mocks in your app
- Create a directory called api/swagger in your app
- Copy your
swagger.yaml
file to the api/swagger directory - Start your app:
swagger project start