Any good OpenAPI 3.x spec generator for a Go REST API?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • ogen

    OpenAPI v3 code generator for go

  • We have used https://github.com/deepmap/oapi-codegen in production for a long time and it's rock solid. Up and coming https://github.com/ogen-go/ogen is being developed rapidly and also worth keeping an eye on.

  • oapi-codegen

    Generate Go client and server boilerplate from OpenAPI 3 specifications

  • We have used https://github.com/deepmap/oapi-codegen in production for a long time and it's rock solid. Up and coming https://github.com/ogen-go/ogen is being developed rapidly and also worth keeping an eye on.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • openapi-generator

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

  • kin-openapi

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

  • This might not be very helpful, but I've have found every "generate spec from code" package to be limited sooner or later, and that's across languages. I finally settled on writing the spec file by hand, linting it in CI using openapi-cli, and using kin-openapi in Go tests to ensure responses match their schema.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts