A library that simplifies Swagger integrations.
Перейти к файлу
Ligengxin 320f7d6a7a
add test cases to increase test coverage to 85.7% (#99)
* integrate the coverage tool into package.json

* add test cases to increase test coverage to 85.7%

* change doublequote to singlequote

* revert code
2020-05-08 12:59:49 +08:00
.vscode support x-ms-mutability check for read in request (#93) 2020-03-24 14:54:37 +08:00
browser merging from upstream master 2018-04-23 17:49:09 -07:00
docs Add the swagger spec path for all operations in the cache. (#89) 2019-12-26 17:46:59 +08:00
lib Keep origin customized validator (#97) 2020-03-27 22:24:55 +08:00
test add test cases to increase test coverage to 85.7% (#99) 2020-05-08 12:59:49 +08:00
.editorconfig Initial project structure. 2015-04-09 19:24:39 -06:00
.eslintrc Update dependencies 2016-02-25 22:29:39 +02:00
.gitignore integrate the coverage tool into package.json (#98) 2020-04-10 13:17:44 +08:00
.nsprc Adding security vulnerability checking 2017-10-10 22:36:21 -06:00
.prettierrc Add title field to schema type (#36) 2018-08-08 14:07:56 -07:00
CONTRIBUTING.md Added a contributing guide 2016-01-12 12:01:15 -07:00
LICENSE Initial project structure. 2015-04-09 19:24:39 -06:00
README.md Fixed title, corrected spacing for easier reading (#53) 2018-10-18 10:09:38 -07:00
RELEASE_NOTES.md Add path info to error message for parameters validation in examples. (#81) 2019-09-04 14:01:19 +08:00
azure-pipelines-securitytasks.yml Add credscan security task. (#87) 2019-12-06 09:39:27 +08:00
azure-pipelines.yml minor 2018-11-02 11:07:40 -07:00
bower.json Upgraded dependencies for new json-refs release 2018-02-11 20:20:01 -07:00
gulpfile.js Use a faster deep clone library and update gulp to version 4 (#85) 2019-11-19 14:58:22 +08:00
index.d.ts Expose the specPath in interface (#90) 2020-01-02 14:44:00 +08:00
index.js Fix to properly return schemaPath in errors (#78) 2019-06-12 12:27:47 -07:00
package-lock.json integrate the coverage tool into package.json (#98) 2020-04-10 13:17:44 +08:00
package.json integrate the coverage tool into package.json (#98) 2020-04-10 13:17:44 +08:00

README.md

Yet another sway

A library that simplifies Swagger integrations. This library handles the minutiae of loading Swagger documents (local and remote), resolving references (local, remote), building an object model and providing you with a rich set of APIs for things like Swagger document validation, request/response validation, etc. For more details on the available APIs, please view the API Documentation.

Sway will always be built around the latest stable release of Swagger, which happens to be version 2.0 right now. This means that its APIs and object model will be specific to that version of Swagger and supporting any other versions of Swagger will require a conversion step prior to using Sway.

Project Badges

  • Build status: Build Status
  • Dependencies: Dependencies
  • Developer dependencies: Dev Dependencies
  • Downloads: NPM Downloads Per Month
  • Gitter: Join the chat at https://gitter.im/apigee-127/sway
  • License: License
  • Version: NPM Version

Installation

sway is available for both Node.js and the browser. Installation instructions for each environment are below.

Browser

Installation for browser applications can be done via Bower or by downloading a standalone binary.

Using Bower

bower install sway --save

Standalone Binaries

The standalone binaries come in two flavors:

Note: I realize these binaries are big and I'm working on making them smaller. Unfortunately, some of this is out of my control without rewriting some of the core features provided by third-party libraries currently contributing to the size issue.

Node.js

Installation for Node.js applications can be done via NPM.

npm install sway --save

Documentation

The documentation for this project can be found here: /docs/README

Of course, if you just want a quick link to the API documentation, that would be here: /docs/API.md

Contributing

This project uses Gulp for building so npm install -g gulp once you clone this project. Running gulp in the project root will lint check the source code and run the unit tests.