Huma is an OpenAPI REST framework for Go designed for building HTTP services with automatic OpenAPI 3.1 specification generation and JSON Schema validation. It serves as a toolkit for developing REST and RPC APIs with typed inputs and outputs, deriving interactive documentation directly from the source code.
The framework distinguishes itself by automating the synchronization between implementation and documentation. It uses a content-negotiation engine to manage multiple serialization formats via client headers and employs a JSON Schema input validator to automatically verify request parameters and bodies based on Go types.
The project covers a broad range of API capabilities, including request parameter binding via struct tags, the management of conditional requests using ETags, and the implementation of partial updates. It also provides tools for server lifecycle management, including command-line configuration, graceful shutdowns, and the integration of custom HTTP routers via a standardized adapter interface.