@microfleet/apidoc-plugin-json-schema
v0.1.3
Published
The `apidoc` plugin that provides `@jsonSchema` keyword.
Downloads
5
Readme
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() {}