FindSoftware

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.

Identity

Status
Active
Maintainer
oapi-codegen2
First release
20193

Rendering and deploy

Install with
go, go get -tool2

Releases

Current major version
25
Last release
2026-10-315

Adoption

GitHub stars
8,6671
Contributors
2916

Why these figures do not compare

Sources

  1. 2026-11-16: links, Written in, License, GitHub stars
    api.github.com/repos/oapi-codegen/oapi-codegen
  2. 2026-11-16: links, Categories, Runtime, Install with, Maintainer
    github.com/oapi-codegen/oapi-codegen/blob/v2.8.2/README.md
  3. 2026-11-16: First release
    api.github.com/repos/oapi-codegen/oapi-codegen/commits/v1.0.0
  4. 2026-11-16: License model
    github.com/oapi-codegen/oapi-codegen/blob/main/LICENSE
  5. 2026-11-16: Current major version, Last release
    api.github.com/repos/oapi-codegen/oapi-codegen/releases
  6. 2026-11-16: Contributors
    api.github.com/repos/oapi-codegen/oapi-codegen/contributors?per_page=1

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON