The project provides various tools for integrating and interacting with Swagger. This project is in its infancy but what is within the repository should be fully tested and reusable. Please visit the issue trackerproject-issues to see what issues we are aware of and what features/enhancements we are working on. Otherwise, feel free to review the Release Notesrelease-notes to see what is new and improved.
If you want to use the
Supported Swagger Versions
- Simple CLI
* Validate Swagger document(s) * Convert Swagger 1.2 documents to Swagger 2.0
- Schema validation: For the file(s) supported by the Swagger specification, ensure they pass structural validation
- Semantic validation: Validates Swagger files above and beyond the structure of the file (Browser and Node)
- Connect middleware for adding pertinent Swagger information to your requests (Node only)
- Connect middleware for wiring up security handlers for requests based on Swagger documentation (Node only)
- Connect middleware for wiring request handlers to requests based on Swagger documentation (Node only)
- Connect middleware for serving your Swagger documents and Swagger UIswagger-ui (Node only)
- Connect middleware for using Swagger resource documents for pre-route validation (Node only)
* Validate the request/response Content-Type based on the operation's `consumes/produces` value(s) * Validate the request parameter types * Validate the request parameter values * Validate the response values
InstallationSwagger Tools is available for both Node.js and the browser. Installation instructions for each environment are below.
BrowserInstallation for browser applications can be done via Bowerbower or by downloading a standalone binary.
bower install swagger-tools --save
Standalone BinariesThe standalone binaries come in two flavors:
- swagger-tools-standalone.js: 2,280kb, full source (including all dependencies) and source maps
- swagger-tools-standalone-min.js: 316kb, minified, compressed
Node.jsInstallation for Node.js applications can be done via NPMnpm.
npm install swagger-tools --save
If you want to use the
swagger-toolsexecutable for validating Swagger documents, you can install swagger-tools globally using the following:
npm install -g swagger-tools
Documentationswagger-tools is heavily documented so head on over to the project documentationdocumentation or jump straight to the Quick Startquick-start.
ContributingThis project uses Gulpgulp for building so
npm install -g gulponce you clone this project. Running
gulpin the project root will lint check the source code and run the unit tests.