koa-swagger-validator
Koa 2 + Swagger 2 + Swagger-tools
Install
$ npm install koa-swagger-validator --save
or
$ yarn add koa-swagger-validator
Usage
validator(spec) => koa2 middleware
;; async { const app = ; app;};
validator(spec, options) => koa2 middleware
;; async { const app = ; app;};
Documentation
Variable | Type | Required |
---|---|---|
spec | object | yes |
options | object | no |
spec
Swagger RESTful API Documentation Specification
options
Properties | Type | Required |
---|---|---|
security | object | no |
validator | object | no |
router | object | no |
ui | object | no |
See also swagger-tools full documentation.
Limitations
- Koa 2
- Swagger 2