0.0.8 • Published 6 years ago

json-schema-gendoc v0.0.8

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

JSON Schema documentation generator

Basic tool used to generate human-readable Markdown documentation from a JSON Schema Validation file. Can be used as a standalone CLI-tool, or imported into an existing JavaScript-project.

Currently, only a small part of the standard is supported.

Preview

Configuration.md is generated from config.schema.json in this repository.

Installation

npm install -g json-schema-gendoc

Usage

Use the following command to genearate a Markdown document from a JSON Schema Validation file.

json-schema-gendoc /path/to/json-schema-file.json

Configuration

json-schema-gendoc can be configured using by creating a file named .json-schema-gendoc.json in the current working directory. The default configuration is included below. All properties are optional. Use translations to translate standard messages into your preferred language if it does not exist in the translations folder (or, even better, create a translation file and send me a PR), and schemaFile to define which file you'd like to generate documentation from.

See Configuration.md for details.

{
    "schemaFile": null,
    "title": null,
    "outputFormat": "markdown",
    "language": "en",
    "translations": {
        "examples": "Examples",
        "properties": "Properties",
        "enum": "Possible values",
        "default": "Default value"
    }
}

Usage without CLI

TODO Document this feature.

See cli.js for an example on how this can be used directly.

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago