salak-joi-to-swagger
v1.0.2
Published
convert joi schema to swagger definitions
Downloads
339
Readme
salak-joi-to-swagger
Convert Joi schema to Swagger definitions
Installation
Install using npm:
npm install --save salak-joi-to-swagger
Usage
const j2s = require('salak-joi-to-swagger')
const { swagger, definitions } = j2s(schema, existingDefinitions)
Supported Convertions
- Joi.string()
- Joi.number()
- Joi.boolean()
- Joi.binary()
- Joi.date()
- Joi.alternatives()
- Joi.array()
- Joi.object()
License
MIT