HOME

TheInfoList



OR:

Swagger is a suite of tools for
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
developers from
SmartBear Software SmartBear Software is an American privately-held information technology company that delivers tools for application performance monitoring (APM), software development, software testing, API testing and API management. The company is based in As ...
and a former specification upon which the
OpenAPI Specification The OpenAPI Specification, previously known as the Swagger Specification, is a specification for a machine-readable interface definition language for describing, producing, consuming and visualizing RESTful web services. Previously part of the Sw ...
is based.


History

The Swagger API project was created in 2011 by Tony Tam, technical co-founder of the dictionary site
Wordnik Wordnik, a nonprofit organization, is an online English dictionary and language resource that provides dictionary and thesaurus content. Some of the content is based on print dictionaries such as the ''Century Dictionary'', the ''American Heritag ...
. 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 JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other s ...
representation of the API, building upon the flexibility of part of the
REST Rest or REST may refer to: Relief from activity * Sleep ** Bed rest * Kneeling * Lying (position) * Sitting * Squatting position Structural support * Structural support ** Rest (cue sports) ** Armrest ** Headrest ** Footrest Arts and ente ...
style of architecture and using many features of tooling built for the
SOAP Soap is a salt of a fatty acid used in a variety of cleansing and lubricating products. In a domestic setting, soaps are surfactants usually used for washing, bathing, and other types of housekeeping. In industrial settings, soaps are used ...
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 Sikelianos 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 Node.js is an open-source server environment. Node.js is cross-platform and runs on Windows, Linux, Unix, and macOS. Node.js is a back-end JavaScript runtime environment. Node.js runs on the V8 JavaScript Engine and executes JavaScript code ou ...
, and
Ruby on Rails Ruby on Rails (simplified as Rails) is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and web ...
. In Swagger's early years, modest traction came from small companies and independent developers. HTTP APIs typically did not have a machine-readable description mechanism, and Swagger provided a simple and discoverable way to do so. Tony was invited to a meeting with some of the API industry's thought leaders including John Musser (
ProgrammableWeb ProgrammableWeb is an information and news source about the Web as a programmable platform. It is a subsidiary of MuleSoft and has offices in San Francisco, CA. The website publishes a repository of web APIs, mashups, and applications, and has d ...
), Marsh Gardiner (
Apigee Apigee Corp. was an API management and predictive analytics software provider before its merger into Google Cloud. It was founded in 2004 as Sonoa Systems before being rebranded as Apigee in 2010. Apigee was acquired by Google in a deal wort ...
, now a Google product), Marco Palladino (
Kong Kong may refer to: Places * Kong Empire (1710–1895), a former African state covering north-eastern Côte d'Ivoire and much of Burkina Faso * Kong, Iran, a city on the Persian Gulf * Kong, Shandong (), a town in Laoling, Shandong, China * Kong, I ...
), 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 HTTP APIs were introduced, the most popular being API Blueprint in April 2013 and
RESTful API Modeling Language RESTful API Modeling Language (RAML) is a YAML-based language for describing static APIs (but not REST APIs). It provides all the information necessary to describe APIs on the level 2 of the Richardson Maturity Model. Although designed with R ...
(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 ource: Google Trends In November 2015,
SmartBear Software SmartBear Software is an American privately-held information technology company that delivers tools for application performance monitoring (APM), software development, software testing, API testing and API management. The company is based in As ...
, the company that maintained Swagger, announced that it was helping create a new organization, under the sponsorship of the
Linux Foundation The Linux Foundation (LF) is a non-profit technology consortium founded in 2000 as a merger between Open Source Development Labs and the Free Standards Group to standardize Linux, support its growth, and promote its commercial adoption. Addi ...
, called the OpenAPI Initiative. A variety of companies, including
Google Google LLC () is an American Multinational corporation, multinational technology company focusing on Search Engine, search engine technology, online advertising, cloud computing, software, computer software, quantum computing, e-commerce, ar ...
, IBM, and
Microsoft Microsoft Corporation is an American multinational corporation, multinational technology company, technology corporation producing Software, computer software, consumer electronics, personal computers, and related services headquartered at th ...
are founding members. On 1 January 2016, the Swagger specification was renamed to
OpenAPI Specification The OpenAPI Specification, previously known as the Swagger Specification, is a specification for a machine-readable interface definition language for describing, producing, consuming and visualizing RESTful web services. Previously part of the Sw ...
, and was moved to a new
software repository A software repository, or repo for short, is a storage location for software packages. Often a table of contents is also stored, along with metadata. A software repository is typically managed by source control or repository managers. Package ...
on
GitHub GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, co ...
. 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.{{citation needed, date=July 2020


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, usin
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 th
Swagger UI
This project allows connections directly to live APIs through an interactive,
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
-based user interface. Requests can be made directly from the UI and the options explored by the user of the interface.


See also

* Representational State Transfer *
OpenAPI Specification The OpenAPI Specification, previously known as the Swagger Specification, is a specification for a machine-readable interface definition language for describing, producing, consuming and visualizing RESTful web services. Previously part of the Sw ...


References


External links


Open API Initiative (OAI) website

Swagger website

OpenAPI Specification on GitHub

Eclipse OpenAPI (OAS) Editor and Studio

Swagger – Tool for API Documentation

OpenAPI Editor and Test Studio Usage Wiki
Application programming interfaces Markup languages