Swagger (software)

from Wikipedia, the free encyclopedia

Swagger is a collection of open source -Werkzeugen to HTTP - Web services to create design (including HTTP API or REST-like API) to document and use. Swagger uses the OpenAPI description standard for this .

Swagger is recognized and supported by many other tools. While most users think of the Swagger UI tool when they think of Swagger, the Swagger toolset provides support for automated documentation, code generation, and test case generation. Along with RAML and API Blueprint, Swagger is one of the frequently used API description languages.

history

The Swagger API project was launched in 2011 by Tony Tam, the technical co-founder of the Wordnik dictionary site. During the development of Wordnik's products, the need to automate API documentation and generate client SDKs became a major source of frustration. Tam designed a simple JSON representation of the API that builds on the flexibility of the REST architecture and uses many of the functions of the tools developed for the SOAP protocol. The concept for the user interface was suggested by Ayush Gupta, who suggested that an interactive user interface would benefit end users who wanted to "try" and develop against the API. Ramesh Pidikiti led the implementation of the first code generator and designer / developer Zeke Sikilianos coined the name Swagger. The Swagger API project was made an open source project in September 2011. Soon after its release, a number of new components were added to the project, including a standalone validator, support for Node.js, and Ruby on Rails .

In its early years, Swagger was influenced by small businesses and independent developers. RESTful APIs typically didn't have a machine-readable description mechanism, and Swagger provided an easy and discoverable way to do it. Tam was invited to a meeting with some API technology thought leaders, including John Musser (Programmable Web), Marsh Gardiner (Apigee, now a Google product), Marco Palladino (Mashape), and Kin Lane (API Evangelist), to support a standardization effort to discuss API descriptions. The meeting did not bring a concrete plan, but Swagger was an important innovation in the API area on the map.

Aided by the use of the Apache 2.0 open source license, a number of products and online services began adding Swagger to their offerings, following its acquisition by Apigee, Intuit , Microsoft , IBM, and others who form the Swagger Project public support began to accelerate rapidly.

Shortly after Swagger was founded, alternative structures were introduced to describe RESTful APIs, with the most popular being API Blueprint in April 2013 and RAML in September 2013. While these competing products received more financial support than Swagger, they initially focused on different use cases of Swagger, and by mid-2014, interest in Swagger grew faster than the combination of the other two.

In November 2015, SmartBear Software (the company that maintains Swagger) announced that it was helping to build a new organization under the auspices of the Linux Foundation , the Open API Initiative. A variety of companies including Google, IBM and Microsoft were founding members.

On January 1, 2016, the Swagger specification was renamed the OpenAPI specification and moved to a new repository on GitHub. Although the specification itself was not changed, this renaming meant the separation between the API description format and the open source tooling.

As of July 2017, Swagger tools have been downloaded more than 100,000 times a day, depending on the Sonatype and NPM hosting repositories.

use

Swagger works with many of the popular programming languages ​​such as Java , Scala , Clojure , Groovy , JavaScript and C-Sharp .

The Swagger open source tooling can be broken down into different use cases:

Development of APIs

When creating APIs, Swagger Tooling can be used to automatically generate an Open API document based on the code itself. This is informally known as 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 because it embeds the API description in a project's source code and it is typically more difficult for non-developers to contribute. Swagger also supports JAX-RS .

Alternatively, developers can use Swagger Codegen to decouple the source code from the Open API document and generate client and server code directly from the draft. While this is viewed as complicated, it has been viewed by many industry experts as a more modern API workflow and allows more freedom in designing the API by shifting the coding aspect.

Interaction with APIs

With the swagger-codegen project, end users generate client SDKs directly from the Open API document, reducing the need for human-generated client code. Since August 2017, the swagger-codegen project has supported more than 50 different languages ​​and formats for creating the client SDK.

Documentation of APIs

When described by an Open API document, Swagger open source tooling can be used to interact directly with the API through the Swagger user interface. This project enables the direct connection of live APIs via an interactive, HTML-based user interface.

literature

Web links

Individual evidence

  1. Dinesh Rajput: Mastering Spring Boot 2.0 limited preview in the Google book search
  2. REST APIs with Node.js and Swagger Heise
  3. Document RESTful APIs - this is how it works! jaxenter.de
  4. Marko Lukša: Kubernetes in Action limited preview in Google Book Search
  5. Bogunuva Mohanram Balachandar: RESTful Java Web Services limited preview in the Google book search