demo

command
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL