Swagger (software)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Swagger
Swagger Logo
Developer(s) SmartBear Software
Initial release 2011; 7 years ago (2011)
License Apache License 2.0
Website swagger.io

Swagger is an open source software framework backed by a large ecosystem of tools that helps developers design, build, document, and consume RESTful Web services. While most users identify Swagger by the Swagger UI tool, the Swagger toolset includes support for automated documentation, code generation, and test case generation.

Sponsored by SmartBear Software, Swagger has been a strong supporter of Open Source Software and has widespread adoption.

History[edit]

The Swagger API project was created in 2011 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 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 (Programmable Web), Marsh Gardiner (Apigee, now a Google product), Marco Palladino (Mashape), 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 Open API Initiative. A variety of companies, including Google, IBM and Microsoft are founding members.[1].

On 1-January 2016 the Swagger specification was renamed to OpenAPI Specification, and was moved to a new repository in GitHub. 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 are downloaded over 100,000 times per day, according to hosting repositories Sonatype and NPM.

Usage[edit]

Swagger open source tooling usage can be broken up into different use cases:

Developing APIs

When creating APIs, Swagger tooling may be used to automatically generate an Open API document based on the code itself. This is informally called code-first or bottom-up API development. While the software code itself can accurately represent the Open API document, many API developers consider this to be an outdated technique as it embeds the API description in the source code of a project and is typically more difficult for non-developers to contribute to.

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. While considered complicated, this has been considered a more modern API workflow by many industry experts and allows more freedom when designing the API by deferring the coding aspect.

Interacting with APIs

Using the swagger-codegen project, end users generate client SDKs directly from the Open API 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 Open API 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.

See also[edit]

References[edit]

  1. ^ "New Collaborative Project to Extend Swagger Specification for Building Connected Applications and Services". www.linuxfoundation.org. Archived from the original on 2016-04-27. Retrieved 2016-04-22. 

External links[edit]