1.0.2 • Published 3 years ago
@busyhe/jsonschema-to-markdown v1.0.2
JSON schema to markdown generator
Install & Usage
npm install jsonschema2mk
Generate DOC.md:
npx jsonschema2mk --schema schema.json >DOC.md
Add partials:
npx jsonschema2mk --schema schema.json --partials dir/ >DOC.md
Add to package.json
{
"scripts": {
"doc": "jsonschema2mk --schema schema.json >DOC.md"
}
}
Plugins:
Example to add partials:
const fs = require("fs");
module.exports = function(data, jsonschema2mk) {
jsonschema2mk.load_partial_dir(__dirname + "/partials");
};
Use as lib:
See cli.js