finds.dev← search

// the find

danielgtaylor/huma

★ 4,159 · Go · MIT · updated Jun 2026

Huma REST/HTTP API Framework for Golang with OpenAPI 3.1

Huma is a Go HTTP API framework that generates OpenAPI 3.1 specs and JSON Schema from your Go types automatically — no separate spec file to maintain. It sits as a thin layer over whatever router you already use (chi, Echo, Fiber, stdlib mux, etc.), so adopting it doesn't require rewriting your routing. Aimed at teams that want FastAPI-style type-driven development without leaving Go.

Router-agnostic adapter model is genuinely well-executed — you keep your existing chi/Echo/Gin setup and Huma just wraps it, which makes incremental adoption realistic rather than a rewrite. Auto-generated PATCH support for JSON Merge Patch and JSON Patch (RFC 7386/6902) out of the box is something most frameworks make you wire yourself. Input validation with RFC 9457 problem+json errors happens at the framework layer before your handler runs, so you're not writing the same nil-check boilerplate everywhere. The humatest package gives you a real test client without spinning up a server, which is the right call.

The 'bring your own router' story breaks down slightly at the edges — conditional request helpers, SSE, and some middleware patterns still require adapter-specific knowledge, and the adapter code for each router is small enough that bugs tend to live there. OpenAPI 3.1 generation from Go struct tags is convenient until your schema needs something the tags can't express (discriminators, complex oneOf), at which point you're fighting the abstraction. No built-in auth primitives — JWT/OAuth2 is documented as a how-to guide that wires middleware yourself, which is fine philosophically but means every team reinvents the same boilerplate. Requires Go 1.25+, which as of mid-2026 is fine, but worth noting if you're on a managed environment with a pinned runtime.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →