json-schema-docs

command module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

README

json-schema-docs

License Go Report Card

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

go install github.com/marcusolsson/json-schema-docs

Run

json-schema-docs -schema ./user.schema.json > user.md

To use a template when generating the Markdown:

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:

+++
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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL