CLI Tool & Go Library
8.2k 2026-04-20
oapi-codegen/oapi-codegen
Automates Go client and server boilerplate generation from OpenAPI 3 specifications, accelerating API development and integration.
Core Features
Generates Go server-side implementations.
Generates Go API clients.
Generates Go HTTP models.
Supports OpenAPI 3.x specifications.
Produces idiomatic and simple Go code.
Quick Start
go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latestDetailed Introduction
`oapi-codegen` is a versatile command-line tool and Go library designed to streamline API development by automatically generating Go code from OpenAPI 3 specifications. It eliminates the need for manual boilerplate coding for server-side implementations, API clients, and HTTP models, allowing developers to concentrate on business logic. By adhering to idiomatic Go practices and comprehensive OpenAPI 3.x support, it ensures consistency, reduces errors, and significantly boosts productivity in API-driven projects.