APIs in Go with Huma 2.0

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • restish

    Restish is a CLI for interacting with REST-ish HTTP APIs with some nice features built-in

  • And now you can test it out, e.g. with Restish:

  • uvloop

    Ultra fast asyncio event loop.

  • I wound up on a different team with pre-existing Python code so temporarily shelved my use of Go for a bit, and we used Sanic (an async Python framework built on top of the excellent uvloop & libuv that also powers Node.js) to build some APIs for live channel management & operations. We hand-wrote our OpenAPI and used it to generate documentation and a CLI, which was an improvement over what was there (or not) before. Other teams used the OpenAPI document to generate SDKs to interact with our service.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • huma

    A modern, simple, fast & flexible micro framework for building HTTP REST/RPC APIs in Go backed by OpenAPI 3 and JSON Schema.

  • I created a Huma v2 branch to rewrite it for Go 1.20+ improving on almost every aspect of the framework, and the 2.0.0 release is available now alongside a brand new Huma Documentation site.

  • libuv

    Cross-platform asynchronous I/O

  • I wound up on a different team with pre-existing Python code so temporarily shelved my use of Go for a bit, and we used Sanic (an async Python framework built on top of the excellent uvloop & libuv that also powers Node.js) to build some APIs for live channel management & operations. We hand-wrote our OpenAPI and used it to generate documentation and a CLI, which was an improvement over what was there (or not) before. Other teams used the OpenAPI document to generate SDKs to interact with our service.

  • go

    The Go programming language

  • We started to dabble in using Go, and I dove deep into the way the language works and how to write idiomatic Go code using the tools it provides. My confidence with Go quickly improved, and I started to help others to pick it up as well.

  • fastapi

    FastAPI framework, high performance, easy to learn, fast to code, ready for production

  • When it came time to evaluate replacing the now aging service, I prototyped a new version using the rapidly growing FastAPI framework, which automatically generates OpenAPI from the code for you, eliminating the possibility of the code & OpenAPI being out of sync, with the downstream effect of the docs, CLI, and SDKs also staying in sync properly. You can also still use a design-first approach, it just involves some structures written in code to be reviewed first. Design vs. code first is a false dichotomy by which we needn't be constrained.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts