OpenAPI Generator allows generation of API client libraries from OpenAPI Specs

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

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

    Generate Go client and server boilerplate from OpenAPI 3 specifications

  • I tried using it as a Go code generator (I only needed structs and marshaler / unmarshaler helpers), but it ended up being way too difficult to use and I couldn't get it to work properly. After a bit of searching, I bumped into Deepmap's implementation https://github.com/deepmap/oapi-codegen which works great. They even added support for oneOf, anyOf and allOf which makes things a lot easier.

  • openapi-generator

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

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • k8s-openapi

    Rust definitions of the resource types in the Kubernetes client API

  • >OpenAPI Generator allows generation of API client libraries from OpenAPI Specs

    It does, but the generated code can be very shitty for some combinations of spec and output language. I maintain Rust bindings for the Kubernetes API server's API, and I chose to write my own code generator instead. The README at https://github.com/Arnavion/k8s-openapi has more details.

  • fusionauth-openapi

    FusionAuth OpenAPI client

  • I talked to a startup ( https://stainlessapi.com/ ) about a service they provide where they take an OpenAPI spec and build good SDKs on top of it. This included making sure they are idiomatic, included examples, handled exceptions if needed, and some other goodness. I passed for now because they don't have the language support we need and I am not sure if we need their level of sophistication, but others may benefit from talking to them. (I think the founder helped build Stripe's API docs, IIRC.)

    As we head down our OpenAPI path (https://github.com/fusionauth/fusionauth-openapi has only been built for the last 9 months), I'm very interested in stories like yours. We're very interested in quality SDKs that are easy to update. But since we control the OpenAPI spec for the product, we might have an easier time than you in some ways.

    Thanks for sharing!

  • tsoa

    Build OpenAPI-compliant REST APIs using TypeScript and Node

  • This is the best project I’ve found to that for that - https://github.com/lukeautry/tsoa. Uses decorators mainly.

    If there are other such projects, please share.

  • smithy

    Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.

  • Also check out Smithy from AWS (https://github.com/awslabs/smithy), the code it generates is much better. It's influenced by the new AWS SDKs so it has generator support for Rust.

  • spectrum

    OpenAPI Spec SDK and Converter for OpenAPI 3.0 and 2.0 Specs to Postman 2.0 Collections. Example RingCentral spec included. (by grokify)

  • Disclosure: I'm a contributor to the project.

    OpenAPI Spec and auto-generated API clients are very useful when multiple languages need to be supported, like when running a developer program. I've worked at companies that both use OpenAPI Generator for official clients and ones that wrote our own tools for API client SDK generation (with different design philosophy). I've used a number of generators myself to compare and submitted fixes / enhancements to OpenAPI Generator. I used the Go client generator a while back and compared it to others, and recently started using the Crystal one.

    To get the most the project, the following is useful: (a) need to support multiple languages, (b) ability to update the generator's code, both in Java and templates (Mustache or Handlebars), and (c) ability to discuss design in GitHub issues and the Slack channel.

    The nice thing about OpenAPI Spec is that there is an ecosystem of tooling to support it, including rendering API references (HTML and PDF), API explorers (HTML pages to execute API calls), API clients, etc. But there is a learning curve. For writing specs by hand, I use and favor the Stoplight Studio IDE ( https://stoplight.io/studio ). For programmatically analyzing and editing specs, which is especially useful for finalizing auto-generated specs, I've built an OpenAPI Spec SDK library to make this easier ( https://github.com/grokify/spectrum ).

  • 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
  • vcloud-rest-openapi

    OpenAPI definitions for vCloud Director's Rest API

  • I maintain a project that converts from a specific API mostly documented in XSD to JSON schema.

    For the specific API I'm interested in XSD and JSON Schema are mostly equivalent. Quite probably it isn't true in the general case.

    Check out some of the test cases in this directory to get an idea https://github.com/ccouzens/vcloud-rest-openapi/blob/main/tr...

  • m3o

    Discontinued Serverless Micro Services

  • We ended up building this in-house like most mentioned. Speakeasy and Stainless are productizing it. Our goal was just to make it available for APIs we were offering to others (https://m3o.com).

  • kin-openapi

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

  • What is your language?

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

    https://github.com/getkin/kin-openapi

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