Convert Joi schema to Swagger definitions
Install using npm:
npm install --save salak-joi-to-swagger
const j2s = require('salak-joi-to-swagger')
const { swagger, definitions } = j2s(schema, existingDefinitions)
- Joi.string()
- Joi.number()
- Joi.boolean()
- Joi.binary()
- Joi.date()
- Joi.alternatives()
- Joi.array()
- Joi.object()
MIT