Skip to content

SalakJS/salak-joi-to-swagger

Repository files navigation

salak-joi-to-swagger

NPM version build status David deps NPM download

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

About

Convert Joi schema to Swagger spec definitions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published