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
Click to show internal directories.
Click to hide internal directories.