Skip to content

teal-finance/docgen-yes

 
 

Repository files navigation

docgen-yes

This Git repo is a maintained fork of docgen. Here all PRs are welcome. The upstream docgen is more conservative.

The libraries docgen and docgen-yes both auto-generates routing documentation for a chi Router from your app source.

Differences

The upstream docgen is very stable, while docgen-yes includes experimental new features.

Generator docgen docgen-yes
JSON ✔ Stable ✔ Minor enahcements
Markdown ✔ Stable ✔ Minor enahcements
HTML ✔ Experimental

Example

Example use of the JSON and Markdown generators.

Example Screenshot (screenshot made with Carbon and retouched with GIMP)

import

Upstream docgen

import (
  "net/http"

  "github.com/go-chi/chi/v5"
  "github.com/go-chi/docgen"
)

To use this fork

import (
  "net/http"

  "github.com/go-chi/chi/v5"
  "github.com/teal-finance/docgen-yes" // note the change
)

Experimental HTML generator

  • Templates built, passing tests
  • HTML Generator is being built, not yet functional (3/18/2018)
    • 85% complete
    • 15% remaining: String building for routes, middleware, handlers & related tests
  • Configuration obj
  • New code inspired from markdown.go
  • See markup.go and markupTemplates.go
  • Designed & implemented by forrest321

Test

Many tests are currently empty: they have just been generated by cweill/gotests.

go test -race -vet all ./...

About

auto-generate routing documentation in JSON or Markdown for a `chi` Router from your app source

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%