Show HN: Huma 2.0, it's like FastAPI for Go built on OpenAPI 3.1 and JSON Schema

1 point by danielgtaylor 1 year ago | 0 comments
I've released Huma 2.0, which is a rewrite I've been working on for the past year based on Go 1.20 and newer. It is updated for OpenAPI 3.1 & JSON Schema 2020-12 and works similar to FastAPI in that you define structs and API operations and then Huma generates the OpenAPI and documentation for you, which you can then use to generate CLIs, SDKs, mocks, etc.

This new version makes it easier to adopt as it now supports many routers, incremental adoption, and more extensibility including full access to the OpenAPI when needed. It's also much faster than v1 and makes significantly fewer dynamic memory allocations.

If you are new to Go or coming from Node.js/Python/etc then there is also a more basic step-by-step tutorial you can follow at <https://huma.rocks/tutorial/installation/>.

Check it out and let me know what you think!