Documentation
¶
Overview ¶
Package main is a demo of stdocs using a fictional Task Tracker API.
Everything here uses the *stdocs.Mux path (what doc.go calls Tier 2). It shows both levels of route documentation:
- zero-config: a route registered with no documentation opts gets a summary inferred from the function name and a tag from the first path segment.
- rich metadata: routes that pass stdocs.WithResponse / stdocs.WithBody produce schemas from Go types in the OpenAPI spec.
Run with: go run ./cmd/demo Then visit http://localhost:8080/docs/ for the docs UI.
Click to show internal directories.
Click to hide internal directories.