oapi-codegen
Go code generator that turns OpenAPI 3.0 and 3.1 specifications into server boilerplate, API clients and models.
oapi-codegen is a command-line tool and library that converts OpenAPI 3.0 and 3.1 specifications into Go code. It generates server boilerplate for Go HTTP routers, API clients and model types, and its server output targets Chi, Echo, Echo v5, Fiber, Fiber v3, Gin, gorilla/mux, Iris and the standard net/http package.
The tool is installed with the Go toolchain, either as a binary or as a go tool dependency of the project that uses it. The source is in the oapi-codegen organization on GitHub, and the project has no website of its own beyond the repository.
Worth knowing
The tool and the generated code have different Go requirements, and the generated code’s minimum depends on the server target.
Sources
- 2026-11-16: links, Written in, License, GitHub stars
api.github.com/repos/oapi-codegen/oapi-codegen - 2026-11-16: links, Categories, Runtime, Install with, Maintainer
github.com/oapi-codegen/oapi-codegen/blob/v2.8.2/README.md - 2026-11-16: First release
api.github.com/repos/oapi-codegen/oapi-codegen/commits/v1.0.0 - 2026-11-16: License model
github.com/oapi-codegen/oapi-codegen/blob/main/LICENSE - 2026-11-16: Current major version, Last release
api.github.com/repos/oapi-codegen/oapi-codegen/releases - 2026-11-16: Contributors
api.github.com/repos/oapi-codegen/oapi-codegen/contributors?per_page=1