OpenAPI Specification

The OpenAPI Specification (OAS) is an open standard for describing and defining RESTful APIs. It was previously called the Swagger Specification and is currently maintained by the OpenAPI Initiative, which is a group of industry experts and companies.

Developer(s)OpenAPI Initiative
Stable release3.1.0 / March 2, 2021 (2021-03-02)
Operating systemCross-platform
TypeWeb service
LicenseApache License 2.0
Websiteswagger.io/specification/

The OAS is a machine-readable format that enables developers to outline the details of an API in a structured and standardized way. This includes information about the endpoints, operations, parameters, responses, and other relevant data. This uniformity makes it easier for developers to understand, use, and test APIs, as well as for tools to generate documentation, client libraries, and server stubs automatically from the specification.

The OAS supports both JSON and YAML formats and has become a popular tool in the API development community.

History

The Swagger Specification was created in 2010 by Tony Tam, technical co-founder of the dictionary site Wordnik. During the development of Wordnik's products, the need for automation of API documentation and client SDK generation became a major source of frustration. Tam designed a simple JSON representation of the API, building upon the flexibility of part of the REST style of architecture, and Swagger quickly gained popularity among API developers due to its ability to generate interactive documentation, client libraries, and server stubs automatically from API specifications.

In 2015, the Swagger Specification was donated to the newly formed OpenAPI Initiative, which is a consortium of industry experts and companies who are dedicated to the development of the standard.

Features

The OAS provides a variety of features that make it easier to design, build, document, and test RESTful APIs. These include:

  • Interactive documentation: Swagger UI allows developers to view and interact with the API in a web browser, making it easy to understand and test the API's functionality.
  • Code generation: Swagger Codegen can generate client libraries, server stubs, and API documentation in various programming languages based on an API's specification.
  • API testing: Swagger Inspector is a cloud-based tool for testing and validating APIs, with support for various authentication methods and response validations.
  • API design: Swagger Editor is a web-based tool for designing and editing API specifications in YAML or JSON format.
  • API management: SwaggerHub is a platform for hosting, sharing, and collaborating on API designs, with features for versioning, team collaboration, and API documentation publishing.

Related pages

Other websites