0.1.3 • Published 4 years ago

@microfleet/apidoc-plugin-json-schema v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Microfleet JSON Schema apidoc plugin

The apidoc plugin that provides @jsonSchema keyword.

Install

yarn add @microfleet/apidoc-plugin-json-schema

Additional apidoc configuration

// apidoc.config.js
const { resolve } = require('path')

module.exports = {
  schemas: {
    path: resolve(__dirname, './schemas') // path to the schemas folder
  }
}

Usage

@apiSchema {jsonschema={relative path to schemas folder}} api{Request|Response}

Example:

/**
 * @apiSchema {jsonschema=path/to/schema.json} apiRequest
 * @apiSchema {jsonschema=path/to/response/schema.json} apiResponse
 */
export function DoWork() {}