The purpose of Swagger Tools (swagger-tools) is to provide some useful Swagger tooling written for Node.js and the browser (where applicable). Use the links below to get specific documentation about the provided APIs and tools:
- API: The JavaScript API for interacting with Swagger documents
- Middleware: Connect middleware using Swagger information for various things (Ex: Request validation, routing, ...)
Swagger Tools is available for both Node.js and the browser. Installation instructions for each environment are below.
Installation for browser applications can be done via Bower or by downloading a standalone binary.
bower install swagger-tools --save
The standalone binaries come in two flavors:
- swagger-tools.js: 876kb, full source and source maps
- swagger-tools-min.js: 204kb, minified, compressed and no sourcemap
Installation for Node.js applications can be done via NPM.
npm install swagger-tools --save
Installation globally right now doesn't make much sense but when the eventual CLI executables are available, you'd install Swagger Tools globally like this:
npm install -g swagger-tools
At this point, you're ready for the Quick Start.