The OpenAPI Specification, previously known as the Swagger Specification, is a specification for a machine-readableinterface definition language for describing, producing, consuming and visualizing web services.[1] Originally developed to support the Swagger framework, it became a separate project in 2015, overseen by the OpenAPI Initiative, an open-source collaboration project of the Linux Foundation.[2][3]
An OpenAPI Description (OAD)[4] represents a formal description of an API that tools can use to generate code, documentation, test cases, and more.
History
Swagger development began in early 2010 by Tony Tam, who was working at online dictionary company Wordnik.[5]
In March 2015, SmartBear Software acquired the open-source Swagger API specification from Reverb Technologies, Wordnik's parent company.[6]
In November 2015, SmartBear announced that it was donating the Swagger specification to a new organization called the OpenAPI Initiative, under the sponsorship of the Linux Foundation. Other founding member companies included 3scale, Apigee, Capital One, Google, IBM, Intuit, Microsoft, PayPal, and Restlet.[7][8]
On 1 January 2016, the Swagger specification was renamed the OpenAPI Specification (OAS) and was moved to a new GitHubrepository.[9]
In July 2017, the OpenAPI Initiative released version 3.0.0 of its specification.[10]
In February 2021, the OpenAPI Initiative released version 3.1.0.[11] Major changes in OpenAPI Specification 3.1.0 include JSON schema vocabularies alignment, new top-level elements for describing webhooks that are registered and managed out of band, support for identifying API licenses using the standard SPDX identifier, allowance of descriptions alongside the use of schema references and a change to make the PathItems object optional to simplify creation of reusable libraries of components.[12][13][14]
Consolidation of Formats
Two somewhat similar technologies, MuleSoft's RESTful API Modeling Language (RAML) and Apiary's API Blueprint, had been developed around the same time as what was then still called the Swagger Specification.
The producers of both formats later joined the OpenAPI Initiative: Apiary in 2016[15] and MuleSoft in 2017.[16] Both have added support for the OAS.[17][16]
The OAS describes the format for OpenAPI Descriptions (OADs),[4] which can be used by a variety of applications, libraries, and tools.
Applications can use OADs to automatically generate documentation of methods, parameters and data models. This helps keep the documentation, client libraries and source code in sync.[19]
When an OAD is used to generate source code stubs for servers, the process is called scaffolding.
Relationships to software engineering practices
The paradigm of agreeing on an API contract first and then programming business logic afterwards, in contrast to coding the program first and then writing a retrospective description of its behavior as the contract, is called contract-first development. Since the interface is determined before any code is written, downstream developers can mock the server behavior and start testing right away.[20] In this sense, contract-first development is also a practice of shift-left testing.
Features
The OpenAPI Specification is language-agnostic. With OpenAPI's declarative resource specification, clients can understand and consume services without knowledge of server implementation or access to the server code.[1]
Tools that work with OpenAPI
The OpenAPI Initiative maintains a list of implementations for version 3.0 of the specification.[21]
Annual conference
The OpenAPI Initiative sponsors an annual API Specifications Conference (ASC). The event has its origins in the API Strategy and Practice Conference (APIStrat) that ran for many years and became part of the OpenAPI Initiative in 2016.
^"OpenAPI Tooling". OpenAPI Tooling. The OpenAPI Initiative. Retrieved 17 September 2024.
Bibliography
Haupt, F.; Karastoyanova, D.; Leymann, F.; Schroth, B. (2014). A Model-Driven Approach for REST Compliant Services. ICWS 2014. 2014 IEEE International Conference on Web Services. pp. 129–136. doi:10.1109/ICWS.2014.30. ISBN978-1-4799-5054-6.
Pautasso, Cesare (2021). Beautiful APIs. LeanPub. p. 100.