Help us shape the future of Go! Take the 2026 Go Developer Survey

genapi

command
v0.32.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

genapi writes the versioned OpenAPI contract (docs/api/openapi.yaml) from the Huma operations registered in pkg/webui. The document is generated, not hand-edited, so it cannot drift from the handlers: the hand-written seed (docs/api/openapi.base.yaml, which now carries only the non-generated metadata — `info` (the contract version) and `tags` (one per family)) is merged with the Huma-generated `paths` and `components`, and the result is written to docs/api/openapi.yaml. A test in this package fails when the committed file is stale.

Regenerate after changing the seed or registering a Huma operation:

go run ./cmd/genapi

Jump to

Keyboard shortcuts

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