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.
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 use of the JSON and Markdown generators.
(screenshot made with Carbon and retouched with GIMP)
import (
"net/http"
"github.com/go-chi/chi/v5"
"github.com/go-chi/docgen"
)import (
"net/http"
"github.com/go-chi/chi/v5"
"github.com/teal-finance/docgen-yes" // note the change
)- 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
Many tests are currently empty: they have just been generated by cweill/gotests.
go test -race -vet all ./...