json-schema-static-docs

0.8.2 • Public • Published

Json Schema Static Docs

npm version CircleCI Commitizen friendly

Installation

npm install json-schema-static-docs

Usage

const JsonSchemaStaticDocs = require('json-schema-static-docs');

( async () => {
  let jsonSchemaStaticDocs = new JsonSchemaStaticDocs({
    inputPath: './schema',
    outputPath: './docs'
  });
  await jsonSchemaStaticDocs.generate();
  console.log('Documents generated.');
})();

Custom Templates

Templates are authored in handlebars.js.

The default template is templates/markdown/schema.hbs.

You can provide your own custom templates using the templatePath option.

In the example below you will be expected to provide `./your-templates/schema.hbs'.

const JsonSchemaStaticDocs = require('json-schema-static-docs');

( async () => {
  let jsonSchemaStaticDocs = new JsonSchemaStaticDocs({
    inputPath: './schema',
    outputPath: './docs',
    templatePath: './your-templates/'
  });
  await jsonSchemaStaticDocs.generate();
  console.log('Documents generated.');
})();

Readme

Keywords

none

Package Sidebar

Install

npm i json-schema-static-docs@0.8.2

Version

0.8.2

License

GPL-3.0-only

Unpacked Size

34.1 kB

Total Files

25

Last publish

Collaborators

  • tomcollinsuk