#1717th of 45 in Backend and cloud templates

oapi-codegen

Go code generator that turns OpenAPI specs into servers, clients and types

Stars
8.7k
License
Apache-2.0
Last commit
Nov 2026
Last release
Oct 2026
Language
Go
Stars, last 29 weeks+473
21 Apr 2026: 8,182 stars28 Apr 2026: 8,202 stars5 May 2026: 8,234 stars12 May 2026: 8,254 stars19 May 2026: 8,275 stars26 May 2026: 8,297 stars2 Jun 2026: 8,315 stars9 Jun 2026: 8,332 stars16 Jun 2026: 8,349 stars23 Jun 2026: 8,367 stars30 Jun 2026: 8,378 stars7 Jul 2026: 8,391 stars14 Jul 2026: 8,409 stars21 Jul 2026: 8,434 stars28 Jul 2026: 8,458 stars4 Aug 2026: 8,470 stars11 Aug 2026: 8,480 stars18 Aug 2026: 8,495 stars25 Aug 2026: 8,509 stars1 Sept 2026: 8,530 stars8 Sept 2026: 8,545 stars15 Sept 2026: 8,557 stars22 Sept 2026: 8,574 stars29 Sept 2026: 8,587 stars6 Oct 2026: 8,597 stars13 Oct 2026: 8,610 stars20 Oct 2026: 8,624 stars27 Oct 2026: 8,631 stars3 Nov 2026: 8,643 stars10 Nov 2026: 8,655 stars

8,182 on 21 Apr 20268,655 on 10 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

oapi-codegen is a Go command-line tool and library that reads OpenAPI 3.0 and 3.1 specs and generates Go server interfaces, API clients, or plain HTTP models. It is configured through a YAML file and typically run via go:generate. It has no AI features, so it fits this list only loosely as backend scaffolding.

Who it is for: Go developers building or consuming OpenAPI-defined HTTP APIs

Strengths

  • Generates server stubs for several Go frameworks, including net/http, plus clients and models
  • Optional strict server mode handles request and response marshalling for you
  • Supports OpenAPI 3.0 and 3.1, including webhooks and the 3.2 QUERY method
  • Generated code comes from text/templates you can override

Weaknesses

  • No OpenAPI 2.0 (Swagger) support; specs must be converted first
  • Template overrides and importing pkg/ are explicitly unstable across releases
  • Building the tool requires Go 1.26+
  • No defined release cadence; README recommends pinning to commits for unreleased fixes

What it needs

  • Go
  • Needs Go 1.26+

Quick answers

Is oapi-codegen open source?

Yes. Its code is on GitHub under the Apache-2.0 license.

Also in Backend and cloud templates

See all 45
Also in Backend and cloud templates
RankProjectScore
1fastapiPython web framework for typed REST APIs with automatic OpenAPI docs104.6k starsMIT90 out of 100
2fiberExpress-style HTTP web framework for Go, built on fasthttp40.3k stars+130 (+0.3%) in 30 daysMIT90 out of 100
3generator-jhipsterCode generator for Java apps with Angular, React or Vue frontends22.5k starsApache-2.090 out of 100
#4serverlessCLI that deploys AWS Lambda code and infrastructure from serverless.yml46.9k starscustom license88 out of 100
#5echoMinimalist Go web framework with a radix-tree router and middleware32.8k stars+73 (+0.2%) in 30 daysMIT86 out of 100