Go OpenAPI

Open-source Go projects categorized as OpenAPI

Top 23 Go OpenAPI Projects

  • grpc-gateway

    gRPC to JSON proxy generator following the gRPC HTTP spec

    Project mention: Ask HN: Rapid Development API-Only One Person Stack – Seeking Performant Tech | news.ycombinator.com | 2023-08-02

    I don't have any example that's public atm, but the guide in grpc-gateway is pretty clear/can be followed step by step.


    To integrate with Fiber, I used the Fiber Adaptor (also pretty straightforward): https://docs.gofiber.io/api/middleware/adaptor

  • swag

    Automatically generate RESTful API documentation with Swagger 2.0 for Go.

    Project mention: go-ecommerce-microservices: A practical e-commerce microservices, built with cqrs, event sourcing, vertical slice architecture, event-driven architecture. | /r/golang | 2023-08-26

    Some of the features: - ✅ Using Vertical Slice Architecture as a high level architecture - ✅ Using Event Driven Architecture on top of RabbitMQ Message Broker with a custom [Event Bus](pkg/messaging/bus/) - ✅ Using Event Sourcing in Audit Based services like [Orders Service](services/orders/) - ✅ Using CQRS Pattern and Mediator Patternon top of Go-MediatR library - ✅ Using Dependency Injection and Inversion of Controlon top of uber-go/fx library - ✅ Using RESTFul api with Echo framework and using swagger with swaggo/swag library - ✅ Using Postgres and EventStoreDB to write databases with fully supports transactions(ACID) - ✅ Using MongoDB and Elastic Search for read databases (NOSQL) - ✅ Using OpenTelemetry for collection Distributed Tracing with using Jaeger and Zipkin - ✅ Using OpenTelemetry for collection Metrics with using Prometheus and Grafana - ✅ Using Unit Test for testing small units with mocking dependent classes and using Mockery for mocking dependencies - ✅ Using End2End Test and Integration Test for testing features with all of their real dependeinces using docker containers (cleanup tests) and testcontainers-go library

  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

  • goa

    Design-based APIs and microservices in Go

    Project mention: Which is the best framework to create web apps with go? | /r/golang | 2023-06-29

    If you really need a framework, you can take a look at Echo or, for a contract-first approach, https://goa.design/

  • go-restful

    package for building REST-style Web Services using Go

    Project mention: FastAPI Replacement - especially with openapi | /r/golang | 2023-01-19

    Chech this one https://github.com/emicklei/go-restful is the one used in kube-api

  • oapi-codegen

    Generate Go client and server boilerplate from OpenAPI 3 specifications

    Project mention: OpenAPI Client and Server Code Generator for Golang | news.ycombinator.com | 2023-08-30
  • kin-openapi

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

    Project mention: OpenAPI Generator allows generation of API client libraries from OpenAPI Specs | news.ycombinator.com | 2022-10-15

    What is your language?

    I've found kin-openapi to be good for Go:


  • gnostic

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

  • Mergify

    Tired of breaking your main and manually rebasing outdated pull requests?. Managing outdated pull requests is time-consuming. Mergify's Merge Queue automates your pull request management & merging. It's fully integrated to GitHub & coordinated with any CI. Start focusing on code. Try Mergify for free.

  • kpt

    Automate Kubernetes Configuration Editing

    Project mention: Introduce KPT KCL SDK - Kubernetes manifests editing with one line of KCL code. | /r/devops | 2023-03-27

    For the kpt tool and kpt kcl SDK, all mutations performed by KCL in place will be checked into git. In reality, KCL is not limited to mutating Kubernetes manifests on the client side. It is also suitable for use in the admission controller (mainly with certain advantages in language features and performance). We also have plans to support the use of KCL by operators in clusters to edit or validate Kubernetes manifests just like Kubevela and CUE language.

  • go-doudou

    go-doudou(doudou pronounce /dəudəu/)is OpenAPI 3.0 (for REST) spec and Protobuf v3 (for grpc) based lightweight microservice framework. It supports monolith service application as well.

    Project mention: go-doudou released v2.0.1 version | /r/golang | 2022-11-14
  • ogen

    OpenAPI v3 code generator for go

    Project mention: How to OpenAPI? | /r/golang | 2023-02-08

    But also this project https://github.com/ogen-go/ogen It worth keeping an eye on.

  • apisprout

    Lightweight, blazing fast, cross-platform OpenAPI 3 mock server with validation

  • api-firewall

    Fast and light-weight API proxy firewall for request and response validation by OpenAPI specs.

    Project mention: api-firewall VS asteria - a user suggested alternative | libhunt.com/r/api-firewall | 2023-08-27
  • openapi-mock

    OpenAPI mock server with random data generation

  • apiclarity

    An API security tool to capture and analyze API traffic, test API endpoints, reconstruct Open API specification, and identify API security risks. 

    Project mention: Two approaches to make your APIs more secure | dev.to | 2023-08-29

    We'll install APIClarity into a Kubernetes cluster to test our API documentation. We're using a Kind cluster for demonstration purposes. Of course, if you have another Kubernetes cluster up and running elsewhere, all steps also work there.

  • lark

    Feishu(飞书)/Lark Open API Go SDK, Support ALL Open API and Event Callback. (by chyroc)

  • oasdiff

    OpenAPI Diff and Breaking Changes

    Project mention: Would you like to be notified when your API provider makes a breaking change? | news.ycombinator.com | 2023-06-11
  • vacuum

    vacuum is the worlds fastest OpenAPI 3, OpenAPI 2 / Swagger linter and quality analysis tool. Built in go, it tears through API specs faster than you can think. vacuum is compatible with Spectral rulesets and generates compatible reports. (by daveshanley)

  • terraform-provider-openapi

    OpenAPI Terraform Provider that configures itself at runtime with the resources exposed by the service provider (defined in a swagger file)

    Project mention: Ask HN: Why is there no Terraform OpenAPI generator? | news.ycombinator.com | 2022-10-14

    Hi folks,

    My company has an OpenAPI3 spec. We have a community supported Terraform provider that we are moving in-house soon.

    I was wondering why there is no easy way to generate a Terraform provider from an OpenAPI spec?

    There's no open issue in the generator project[0].

    Some googling turned up a couple of projects[1],[2], but they only support Swagger; OpenAPI is the successor to Swagger. There is some progress on supporting OpenAPI[3]. I also found this provider, which is a thin wrapper around REST calls[4].

    It's not discussed very much on the Terraform forum[5].

    Either I'm missing the need for this or underestimating the difficulty.

    0: https://github.com/OpenAPITools/openapi-generator/issues?q=is%3Aissue+is%3Aopen+terraform

    1: https://www.logicmonitor.com/blog/how-to-write-a-custom-terraform-provider-automatically-with-openapi

    2: https://github.com/dikhan/terraform-provider-openapi

    3: https://github.com/dikhan/terraform-provider-openapi/pull/320

    4: https://github.com/Mastercard/terraform-provider-restapi

    5: https://discuss.hashicorp.com/t/sdk-provider-development-anyone-ever-used-code-generation-or-other-tools-to-simplify-their-provider-development/20301/2

  • rest

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

    Project mention: [Request] Library Recommendation for Auto Swagger/OpenAPIv3 Documentation | /r/golang | 2023-05-27

    This is what I use: https://github.com/swaggest/rest

  • kusk-gateway

    Kusk-gateway is an OpenAPI-driven API Gateway for Kubernetes

    Project mention: Setup Ingress Controller with CORS configuration | dev.to | 2022-10-04

    Check out how to configure CORS, rate-limiting and authentication in your Ingress Controller in our guides and let us know about your experience in our Discord channel, and we are more than happy to see issues raised and PRs opened in our Github repository :)

  • huma

    Huma REST/HTTP API Framework for Golang with OpenAPI 3

    Project mention: State of OpenAPI support in Go routing/web frameworks | /r/golang | 2023-02-03

    Huma might be an option.

  • thema

    A CUE-based framework for portable, evolvable schema

  • libopenapi

    libopenapi is a fully featured, high performance OpenAPI 3.1, 3.0 and Swagger parser, library, validator and toolkit for golang applications.

    Project mention: A common question about how to find repositories to contribute to | /r/golang | 2023-06-03

    Want to get involved in the OpenAPI community? This is an up and coming library for working with OpenAPI docs lots of potential for improvement https://github.com/pb33f/libopenapi

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-08-30.

Go OpenAPI related posts


What are some of the best open-source OpenAPI projects in Go? This list will help you:

Project Stars
1 grpc-gateway 16,046
2 swag 8,817
3 goa 5,282
4 go-restful 4,873
5 oapi-codegen 4,091
6 kin-openapi 2,094
7 gnostic 1,837
8 kpt 1,546
9 go-doudou 1,216
10 ogen 739
11 apisprout 651
12 api-firewall 494
13 openapi-mock 420
14 apiclarity 417
15 lark 347
16 oasdiff 311
17 vacuum 281
18 terraform-provider-openapi 260
19 rest 247
20 kusk-gateway 230
21 huma 225
22 thema 201
23 libopenapi 154
Static code analysis for 29 languages.
Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.