Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 1.69 KB

README.md

File metadata and controls

68 lines (46 loc) · 1.69 KB

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/micheartin/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

Build

go build

Test

go test -race
go test -race ./...

Tests generated by cweill/gotests