oapi-codegen

Generate Go client and server boilerplate from OpenAPI 3 specifications (by oapi-codegen)

Oapi-codegen Alternatives

Similar projects and alternatives to oapi-codegen

  1. openapi-generator

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

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. sqlc

    Generate type-safe code from SQL

  4. Gin

    Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performance—up to 40 times faster—thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices.

  5. Echo

    High performance, minimalist Go web framework

  6. chi

    lightweight, idiomatic and composable router for building Go HTTP services

  7. go-zero

    A cloud-native Go microservices framework with cli tool for productivity.

  8. mux

    Discontinued A powerful HTTP router and URL matcher for building Go web servers with 🦍

  9. sqlx

    general purpose extensions to golang's database/sql

  10. gqlgen

    go generate based graphql server library

  11. swag

    Automatically generate RESTful API documentation with Swagger 2.0 for Go.

  12. httprouter

    A high performance HTTP request router that scales well

  13. goa

    Design-first Go framework that generates API code, documentation, and clients. Define once in an elegant DSL, deploy as HTTP and gRPC services with zero drift between code and docs.

  14. twirp

    A simple RPC framework with protobuf service definitions

  15. GoSwagger

    Swagger 2.0 implementation for go

  16. connect-es

    30 oapi-codegen VS connect-es

    The TypeScript implementation of Connect: Protobuf RPC that works.

  17. godotenv

    A Go port of Ruby's dotenv library (Loads environment variables from .env files)

  18. ogen

    OpenAPI v3 code generator for go

  19. pushup

    Pushup is for making modern, page-oriented web apps in Go

  20. kin-openapi

    OpenAPI 3.0 and 3.1 (and Swagger v2) implementation for Go (parsing, converting, validation, and more)

  21. rest

    Web services with OpenAPI and JSON Schema done quick in Go (by swaggest)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better oapi-codegen alternative or higher similarity.

oapi-codegen discussion

Log in or Post with

oapi-codegen reviews and mentions

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
  • A note from our sponsor - SaaSHub
    www.saashub.com | 9 Jun 2026
    SaaSHub helps you find the best software and product alternatives Learn more →

Stats

Basic oapi-codegen repo stats
76
8,370
9.1
6 days ago

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com

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