Giter Site home page Giter Site logo

gendoc's Introduction

Gendoc

Build Status

Gendoc is generate documentation from JSON Schema

This is inspired by Prmd.

Install

go get github.com/hiroosak/gendoc

Usage

Gendoc provides these commands.

  • init - Create initialized YAML file
  • doc - Generate HTML from json schema
  • valid - Validation JSON Schema format
  • gen - Generate JSON from YAML

Example

$ gendoc init article > src/article.yml
$ gendoc init comment > src/comment.yml
$ vim src/{article,comment}.yaml

# Build docs
$ gendoc doc -src ./src -meta meta.json > docs.html

doc

Generate a HTML document. This command has these flag options.

  • src - directory where the yaml, json file entered
  • meta - overall API metadata
  • overview - preamble for generated API docs(html format)
# Build docs
$ gendoc doc -src ./src -meta meta.json -overview overview.html > docs.html

meta

{
  "title": "API Title",
  "base_url": "http://localhost/",
  "headers": [
    "X-Service-Token: AAA"
  ]
}

YAML to JSON

Convert the yaml files under the src directory to JSON.

# Build json
$ gendoc gen -src ./src -dst ./dst # src/article.yml -> dst/articles.json

License

MIT

gendoc's People

Contributors

hiroosak avatar

Stargazers

Koichi Shiraishi avatar Yousan_O avatar  avatar Satoshi Ohki avatar  avatar Takeshi Yamashita avatar syui avatar Fanli (Christian) Ramsey avatar Hayato Mizuno avatar HIRAKI Satoru avatar Ayumu Sato avatar Shohhei Itoh avatar Akinori Yamada avatar HOU Bin avatar Osamu TONOMORI avatar

Watchers

 avatar James Cloos avatar

Forkers

mnkd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.