microjoi

1.0.3 • Public • Published

microjoi

Swagger documentation tool for microapi-based projects using joi schemas.

Usage

npm install -g microjoi
cd /path/to/your/project
microjoi [./api/directory]

Microjoi will look for a /schemas directory and a definitions.js file under your project's /api directory (or the supplied path), convert all found joi schemas to Swagger objects, and create a swagger.json file within that directory. If a swagger.json file already exists, Microjoi will load the file and update it with the new paths and definitions, thus preserving the remaining fields.

./api/definitions.js

const joi = require('joi')
 
module.exports = {
  'schema-name': joi...
}

/microjoi/

    Package Sidebar

    Install

    npm i microjoi

    Weekly Downloads

    5

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • jorgezaccaro
    • webwallet