https://github.com/marcusolsson/json-schema-docs
A simple JSON Schema to Markdown generator.
https://github.com/marcusolsson/json-schema-docs
Last synced: 3 months ago
JSON representation
A simple JSON Schema to Markdown generator.
- Host: GitHub
- URL: https://github.com/marcusolsson/json-schema-docs
- Owner: marcusolsson
- License: apache-2.0
- Created: 2020-05-13T15:23:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-08T22:26:21.000Z (over 3 years ago)
- Last Synced: 2025-03-24T18:21:51.088Z (4 months ago)
- Language: Go
- Size: 51.8 KB
- Stars: 17
- Watchers: 70
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# json-schema-docs
[](LICENSE)
[](https://goreportcard.com/report/github.com/grafana/json-schema-docs)A simple JSON Schema to Markdown generator.
This generator doesn't attempt to support the full JSON Schema specification. Instead, it's designed with the rationale that most people are only using a subset of the spec.
## Install
```bash
go install github.com/marcusolsson/json-schema-docs
```## Run
```bash
json-schema-docs -schema ./user.schema.json > user.md
```To use a template when generating the Markdown:
```bash
json-schema-docs -schema ./user.schema.json -template user.md.tpl > user.md
````template` is the path to a file containing a Go template, such as this one:
```bash
+++
title = "{{ .Title }}"
description = "{{ .Description }}"
+++# API reference
This is the reference documentation for an API.
{{ .Markdown 2 }}
```The argument to `.Markdown` is the heading level you want the docs to start at.
## License
[Apache 2.0 License](LICENSE)