What is the difference between OpenAPI and Swagger? Which version do you use?
sobes.tech AI
Answer from AI
OpenAPI is a specification for describing RESTful APIs, which allows standardizing the description of web service interfaces. Swagger, on the other hand, was originally a tool and ecosystem for working with APIs, including generating documentation, client SDKs, and server stubs.
In 2016, the Swagger specification was renamed to OpenAPI Specification (OAS) and handed over to the Linux Foundation under the OpenAPI Initiative. Currently, OpenAPI is a standard, and Swagger is a set of tools supporting this standard.
Typically, the latest stable version of the OpenAPI Specification is used; as of 2024, this is OpenAPI 3.1.x, as it supports more flexible descriptions, including full compatibility with JSON Schema.
Example of using OpenAPI 3.1: