ArticleslgStudy

computer science

Swagger (software)

Swagger (software) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Swagger (software) rather than just read about it. In short: Swagger is a suite of tools for API developers from SmartBear Software and a former specification upon which the OpenAPI Specification is based. History The Swagger API project was created in 2011 by Tony Tam, technical co-founder of the dictionary site Wordnik.

Swagger (software) — main illustration
Swagger (software) — illustration

Key takeaways

  • Swagger (software) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Swagger (software) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Swagger (software) from memory before moving on to harder problems.

Reference excerpt

Swagger is a suite of tools for API developers from SmartBear Software and a former specification upon which the OpenAPI Specification is based.

History 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 HTTP protocol 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 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 and support for Node.js and Ruby on Rails. 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), 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 HTTP APIs were introduced, the most popular being API Blueprint in April 2013 and RESTful API Modeling Language (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. On 1 January 2016, the Swagger specification was renamed to OpenAPI Specification, and was moved to a new software repository on 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 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.

See also OpenAPI Specification

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

Worked examples

Example 1 — a first encounter with Swagger (software)

Start with the simplest possible case. Write down what Swagger (software) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Swagger (software) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Swagger (software) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Swagger (software)

In research
Swagger (software) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Swagger (software) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Swagger (software) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Application programming interfaces, Markup languages, so understanding it makes those chapters shorter.
In everyday life
Look for Swagger (software) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Swagger (software)” →

How to study Swagger (software) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Swagger (software) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Swagger (software) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Swagger (software) in simple terms?

Swagger is a suite of tools for API developers from SmartBear Software and a former specification upon which the OpenAPI Specification is based. History The Swagger API project was created in 2011 by Tony Tam, technical co-founder of the dictionary site Wordnik.

Why does Swagger (software) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Swagger (software)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Swagger (software).

Tags

  • Application programming interfaces
  • Markup languages

Keep exploring