openapi-generator-go VS oapi-codegen

Compare openapi-generator-go vs oapi-codegen and see what are their differences.

openapi-generator-go

An opinionated OpenAPI v3 code generator for Go. Use this to generate API models and router scaffolding. (by contiamo)

oapi-codegen

Generate Go client and server boilerplate from OpenAPI 3 specifications (by oapi-codegen)
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
openapi-generator-go oapi-codegen
1 76
111 7,909
0.9% 2.4%
4.8 8.8
9 months ago 7 days ago
Go Go
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

openapi-generator-go

Posts with mentions or reviews of openapi-generator-go. We have used some of these posts to build our list of alternatives and similar projects.

oapi-codegen

Posts with mentions or reviews of oapi-codegen. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-10-17.
  • Show HN: BoGO – Generate Go back end services directly from SQL files
    3 projects | news.ycombinator.com | 17 Oct 2025
    Very cool, reminds me of both [sqlc](https://sqlc.dev) and [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen)

    I'm not a fan of the enterprisey hexagonal-style code this generates, but I can understand where this might be useful for someone who does follow that.

    A question regarding evolution: it's rare that schemas stay constant. I'm not sure if this tool will lend itself well when the time comes to, say, add another table, though I might be misunderstanding here.

  • Show HN: OpenAPI-TypeScript-server – Codegen TypeScript servers from OpenAPI
    2 projects | news.ycombinator.com | 4 Aug 2025
    I really want the ergonomics of schema-first development from gRPC, combined with the ubiquity of OpenAPI. I couldn't quite find anything I really liked off-the-shelf for node + TypeScript, so I wrote one. It's largely modeled off of https://github.com/oapi-codegen/oapi-codegen for Go.

    I've always been excited about OpenAPI and schema-first development, but I'm betting that these artifacts will be extra important in the era of coding agents. Giving the LLM one place to see your entire domain feels like a good way to accelerate the value of these tools. And good for humans, too!

    I'm looking for early feedback, suggestions for other projects to look at, moral support, "this is a bad idea" kind of discouragement if necessary, etc.

  • ⚙️ Go Tools: Code Generation from OpenAPI Specs in Go with oapi-codegen
    1 project | dev.to | 22 May 2025
    🔗 GitHub Repository: oapi-codegen
  • Looking back at `oapi-codegen`'s last year
    1 project | news.ycombinator.com | 19 May 2025
  • Goravel: A Go framework inspired by Laravel
    9 projects | news.ycombinator.com | 9 Mar 2025
    A simple Google search returns https://github.com/oapi-codegen/oapi-codegen

    I get wanting to be productive and gravitating towards patterns you’re familiar with but in the end it’s all bloat. http can do routing and patterns and cookies and sessions. database/sql can do your DAL work. uuid (various implementations) work for user/tenant uid+oid obfuscation. JWT libs for auth. You can literally json.unmarshal your config for your whole application or use godotenv to use environment variables. template/html for views. Golang has batteries, it’s just you don’t know what you don’t know so you expect a certain perspective that isn’t how we do things. Like joining a new company, things are different here. If you spent some time to learn the “go way” you’d realize that you don’t need the bloat, you just need the structure. The “where I expect it”.

  • API testing through simulations
    4 projects | dev.to | 2 Mar 2025
    First, let’s set up our development environment. We’ll use OpenAPI Generator within Docker to generate our HTTP client, keeping our local environment clean. For this demonstration, we’ll work with fakerestapi.azurewebsites.net (kudos to the maintainers of public APIs). Here’s our Docker configuration for the client generator:
  • gRPC vs. REST: Understand gRPC, OpenAPI and REST and When to Use in API Design
    12 projects | news.ycombinator.com | 22 Jan 2025
    > https://github.com/oapi-codegen/oapi-codegen

    I'm using it for a small personal project! Works very well. Thank you!

  • Show HN: Find your "holy grail piece", as a service
    2 projects | news.ycombinator.com | 17 Jan 2025
  • Building and Deploying a New API (Part 1)
    3 projects | dev.to | 7 Jan 2025
    Moving on to oapi-codegen, a tools.go file has been created as exemplified in its repository. I have also created the file internal/handlers/server.go:
  • The value of API-First design on side-projects
    1 project | dev.to | 12 Jul 2024
    To generate the server-side code, we need some library. I found oapi-codegen for that. It supports many popular HTTP libraries (echo, gin, etc.) At the time of writing, I used oapi-codegen@v2.3.0

What are some alternatives?

When comparing openapi-generator-go and oapi-codegen you can also consider the following projects:

openapi-processor-spring - an OpenAPI 3.2, 3.1 & 3.0 interface & model java code generator for Spring Boot

ogen - OpenAPI v3 code generator for go

gnostic - A compiler for APIs described by the OpenAPI Specification with plugins for code generation and other API support tasks.

openapi-generator - OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)

openapi-generator-maven-plugin-template-customization-example - An example Maven project that uses the OpenAPI Generator Maven plugin with template customization to generate an API model and server

kin-openapi - OpenAPI 3.0 (and Swagger v2) implementation for Go (parsing, converting, validation, and more)

Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured

Did you know that Go is
the 3rd most popular programming language
based on number of references?