Skip to content
Laradoc Website

What is the difference between OpenAPI and Swagger?

If you're a developer working with APIs, you've probably heard of both OpenAPI and Swagger. While these two terms are often used interchangeably, they actually refer to different things.

OpenAPI: A specification for describing APIs

OpenAPI is a specification for describing REST APIs. It provides a standardized way to describe the structure of an API, including its endpoints, operations, parameters, responses, and more. OpenAPI is designed to be machine-readable and can be written in YAML or JSON.

The OpenAPI specification was originally called "Swagger Specifications", and it was created by Tony Tam and his team at Reverb Technologies in 2010. In 2015, SmartBear, a company that specializes in software quality tools, acquired the Swagger API project from Reverb Technologies. SmartBear then donated the Swagger specification to the OpenAPI Initiative, a consortium of companies and individuals that includes Google, IBM, Microsoft, and others. This is how "Swagger Specifications" was renamed to "OpenAPI specifications".

Swagger: A suite of tools for working with OpenAPI

Swagger, on the other hand, is a set of tools for designing, building, documenting, and testing APIs that conform to the OpenAPI specification. Swagger includes several tools that are widely used by developers and organizations to work with OpenAPI descriptions:

  • Swagger Editor: An online editor for creating and editing OpenAPI descriptions

  • Swagger UI: A tool for generating interactive documentation from OpenAPI descriptions.

  • Swagger Codegen: A tool for generating client libraries and server stubs from an OpenAPI description.

  • Swagger Inspector: A tool for testing APIs by sending requests and inspecting responses.

  • SwaggerHub: A platform for collaborating on and managing OpenAPI descriptions and APIs.

TL;DR

  • OpenAPI is a specification for describing APIs in a standardized way.

  • Swagger is a set of tools for designing, building, documenting, and testing APIs that conform to the OpenAPI specification.

  • The OpenAPI specification was originally called "Swagger Specifications". SmartBear Software acquired the project in 2015 and donated it to the OpenAPI Initiative.

More articles