0.1.1 • Published 8 years ago

grunt-json-schema-to-markdown v0.1.1

Weekly downloads
1
License
-
Repository
github
Last release
8 years ago

grunt-json-schema-to-markdown

Grunt tool to convert JSON schema to Markdown documentation

Codeship Status for simplemerchant/grunt-json-schema-to-markdown

Overview

This is currently a basic wrapper around the current library: json-schema-to-markdown

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-json-schema-to-markdown --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-json-schema-to-markdown');

The "json_schema_to_markdown" task

Overview

In your project's Gruntfile, add a section named json_schema_to_markdown to the data object passed into grunt.initConfig().

grunt.initConfig({
  markdown_schema: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific file lists and/or options go here.
    },
  },
});

Options

No options currently available for this tool

Usage Examples

Default Options

The output markdown file is specified as a key in the files parameter. Multiple outputs can be specified. Multiple inputs may be combined into one markdown document.

grunt.initConfig({
  markdown_schema: {
    options: {},
    files: {
      'docs/mySchemas.md': ['schemas/schema1.json', 'schemas/schema2.json'],
    },
  },
});

Release History

0.1.1 - Fix to the README

0.1.0 - Initial release