OpenAPI Specification: Difference between revisions

Content deleted Content added
m removes the dead link for programmable web
Line 41:
On 1 January 2016, the Swagger specification was renamed the OpenAPI Specification (OAS) and was moved to a new [[GitHub]] [[Software repository|repository]].<ref>{{cite web |last1=OpenAPI Initiative |title=OpenAPI Specification |url=https://github.com/OAI/OpenAPI-Specification |website=GitHub |access-date=12 November 2019}}</ref>
 
In July 2017, the OpenAPI Initiative released version 3.0.0 of its specification.<ref>{{Cite web|url=https://www.openapis.org/blog/2017/07/26/the-oai-announces-the-openapi-specification-3-0-0 |date=July 26, 2017 |title=The OAI Announces the OpenAPI Specification 3.0.0|website=OpenAPIs|access-date=2018-04-19}}</ref> [[MuleSoft]], the main contributor to the alternative [[RESTful API Modeling Language]] (RAML), joined the OAS and open-sourced its API Modeling Framework tool, which can generate OAS documents from RAML input.<ref>{{Cite web|url=https://www.infoq.com/news/2017/05/api-raml-oas |first1=Abel |last1=Avram |date=May 6, 2017 |title=The HTTP API space is Consolidating around OAS|website=InfoQ|access-date=2017-05-14}}</ref>
 
In February 2021, the OpenAPI Initiative released version 3.1.0.<ref>{{Cite web|url=https://www.linux.com/news/openapi-specification-3-1-0-available-now |date=April 26, 2021 |title=OpenAPI Specification 3.1.0 Available Now|website=Linux.com|access-date=2021-04-26}}</ref> 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.<ref>{{Cite web|url=https://nordicapis.com/whats-new-in-openapi-3-1-0/ |first1=Tyler |last1=Charboneau |date=April 7, 2021 |title=What's New in OpenAPI 3.1.0?|website=Nordic APIs|access-date=2021-04-07}}</ref><ref>{{Cite web|url=https://www.openapis.org/blog/2021/02/18/openapi-specification-3-1-released |date=February 18, 2021 |title=OpenAPI Specification 3.1.0 Released|website=OpenAPI Initiative|access-date=2021-02-18}}</ref><ref>{{Cite web|url=https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0 |first1=Phil |last1=Sturgeon |date=February 16, 2021 |title=Migrating from OpenAPI 3.0 to 3.1.0|website=OpenAPI Initiative|access-date=2021-02-16}}</ref>
 
==Release dates==
Line 49:
{| class="wikitable"
|-
! Version !! Date !! Notes<ref>{{cite web|url=https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md |website=GitHub |title=OpenAPI Specification Version 3.1.0|access-date=November 7, 2023}}</ref>
|-
| 3.1.0 || 2021-02-15 || Release of the OpenAPI Specification 3.1.0
Line 77:
 
==Usage==
Applications implemented based on OpenAPI interface files can automatically generate documentation of methods, parameters and [[data model]]s. This helps keep the [[Software documentation|documentation]], client libraries and source code in sync.<ref name=git>{{Cite web|title = swagger-api/swagger-spec|url=https://github.com/swagger-api/swagger-spec/wiki|website = GitHub|access-date = 2015-12-01 |url-status=deviated |archive-url=https://archive.is/eTcAK |archive-date= 4 Jun 2016 }}</ref>
 
When an OpenAPI document is used to generate source code stubs for servers, the process is called [[Scaffold (programming)|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 object|mock]] the [[Server (computing)|server]] behavior and start testing right away.<ref>{{Cite book |last=Preibisch |first=Sascha |url=https://www.worldcat.org/oclc/1076234393 |publisher=Apress |title=API development Development: aA practicalPractical guideGuide for businessBusiness implementationImplementation successSuccess |date=2018 |isbn=978-1-4842-4140-0 |___location=[Berkeley, CA] |oclc=1076234393 |quote=Having the Swagger (or for that matter, any other machine-readable) document available, team members can start working on their part of the project at the same time.}}</ref> In this sense, contract-first development is also a practice of [[shift-left testing]].
 
==Features==
Line 90:
The OpenAPI Initiative maintains a list of implementations for version 3.0 of the specification. SmartBear still brands its OpenAPI tools with the Swagger moniker. The Swagger UI framework allows both developers and non-developers to interact with the API in a sandbox UI that gives insight into how the API responds to parameters and options. Swagger can handle both [[JSON]] and [[XML]].<ref name="git" />
 
Swagger Codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing the OpenAPI definition. In July, 2018, William Cheng, the top contributor to Swagger Codegen, and over 40 other contributors to Swagger Codegen [[Fork (software development)|forked]] the code into a project named OpenAPI Generator under the OpenAPI Tools organization.<ref>{{cite news|url=https://angular.schule/blog/2018-06-swagger-codegen-is-now-openapi-generator |first1=Johannes |last1=Hoppe |date=2018 |website=Angular.Schule |title=Swagger Codegen is now OpenAPI Generator|access-date=August 6, 2019}}</ref><ref>{{cite news|url=https://openapi-generator.tech/docs/fork-qna |website=OpenAPI Generator |title=Swagger Codegen Fork: Q&A|access-date=August 6, 2019}}</ref>
 
==Annual conference==