swagger-enum
Generate readable enum definitions for Swagger
Install
$ npm install --save swagger-enum
Usage
var Enum = //=> {title: ..., type: 'integer', description: ...}
The description will be:
The status0: off1: on
API
Enum([data], values)
-> object
data
Required
Type: object
Initial data for the schema.
values
Required
Type: object
An object containing enum values (the keys are integers).
License
MIT © Ben Drucker