Generate Markdown documentation from a Table Schema JSON file.
Note: For now Table Schemas specification doesn't define metadata properties. This project is based on this proposal.
npm install -g @opendataschema/table-schema-to-markdown
A schema can be passed by file path or by URL. Examples:
table-schema-to-markdown schema.json
table-schema-to-markdown https://git.opendatafrance.net/scdl/subventions/raw/master/schema.json
By default, fields are rendered as headings, but it is possible to render them as a table:
table-schema-to-markdown --fields-format=table schema.json
The program reads your current locale to output translated messages, but it's possible to pass another locale:
LC_ALL=fr table-schema-to-markdown schema.json
Another Handlebars template file or partials directory can be passed also:
table-schema-to-markdown --template my_template.hbs --partials my_partials_dir schema.json
For this schema, see this rendering.
Install project with its dependencies:
git clone https://framagit.org/opendataschema/table-schema-to-markdown.git
cd table-schema-to-markdown
npm install
Use it:
node src/cli.js <schema.json>
LC_ALL=fr node src/cli.js <schema.json>
LC_ALL=fr node src/cli.js --template <template.hbs> <schema.json>
Publish a new version:
npm version X.Y.Z