Skip to content
SPECIFICTION
Get listed

OpenAPI Generator vs Swagger Codegen

OpenAPI Generator

openapi-generator.tech

Swagger Codegen

swagger.io

Side by side

FigureOpenAPI GeneratorSwagger Codegen
Price fromFreeFree
Free planYesYes
Free trial——
Open source—Yes
WebYesYes
WindowsYesYes
macOSYesYes
LinuxYesYes
API—Yes
Self-hostedYesYes
Plans published12
Spec score · API Generation Software7.7 (#11)8.3 (#3)
Spec score · Code Generators7.8 (#21)8.3 (#9)
CustomizationUsers can replace templates with Mustache templates, provide additional files and extensions through configuration, or create custom generators.Users can replace Mustache templates with their own directory and create custom generator modules using the meta command.
InstallationThe CLI can be installed through npm, Homebrew, Scoop, PyPI, Docker, JAR, JBang, or a Bash launcher script.Official installation options include downloading a JAR from Maven Central and installing through Homebrew.
PurposeGenerates clients, servers, and documentation from OpenAPI 2.0 and 3.x documents.Swagger Codegen generates API client libraries, server stubs, and documentation from OpenAPI specifications.

Plans

OpenAPI Generator

  • OpenAPI GeneratorFree

OpenAPI Generator pricing →

Swagger Codegen

  • Open-source Swagger CodegenFree
  • Swagger CodegenFree

Swagger Codegen pricing →

In their own words

OpenAPI Generator

OpenAPI Generator produces API clients, server stubs, and documentation from OpenAPI 2.0 and 3.x documents. It offers more than 50 client generators and server stub generation for over 40 languages and technologies, including Java, Kotlin, Go, and PHP. Other outputs include Apache2 configuration, MySQL, GraphQL schemas, and formats such as HTML and Cwiki. It can also convert OpenAPI 2.0 documents into OpenAPI 3.x JSON or YAML. Generated output can be adapted with Mustache templates, configuration-provided files and extensions, or custom generators. Installation choices include npm, Homebrew, Scoop, PyPI, Docker, JAR, JBang, and a Bash launcher. The project documents Gradle, Maven, sbt, Bazel, GitHub, and CI/CD integrations. Supported operating systems include Linux, macOS, and Windows, though installer availability varies by system. The JAR option requires Java 11 or later. The project is free and describes a Slack community for questions and guidance.

Visit openapi-generator.tech

Swagger Codegen

Swagger Codegen is an open-source tool that generates API client libraries, server stubs and documentation from OpenAPI specifications. Its template-driven engine parses OpenAPI or Swagger definitions and produces project code from schemas. Swagger states that it can generate client SDKs in over 40 languages and server boilerplate in over 20. Listed capabilities include OpenAPI import, schema-to-code generation, project scaffolding, custom templates, an interactive API reference, code samples and a command-line interface. Outputs and integrations include HTML and Confluence Wiki documentation, Apache2 configuration files and JMeter. The project is available from GitHub under the Apache-2.0 license, with a hosted option through SwaggerHub. SwaggerHub can generate code in a selected language and push it to source-control repositories. Supported client targets include C#, Dart, Go, Java, JavaScript, Kotlin, PHP, Python, R, Ruby, Scala, Swift and TypeScript variants. Server targets include ASP.NET Core, Go, Java Vert.x and JAX-RS options. The repository warns that untrusted descriptions may cause code injection.

Visit swagger.io