Swagger
Swagger is a set of tools for working with HTTP API descriptions. Swagger UI, one of those tools, turns an API description into an interactive web page where you can browse operations and send requests.
Also known as: Swagger UI
What people mean by Swagger
If a teammate says “check Swagger for the endpoint,” they probably mean Swagger UI. It's a browser page where you can see what requests an API accepts and what responses it documents. If you're building a book catalog, for example, you can look up the list operation and check whether it accepts pagination parameters without reading the server code.
OpenAPI is the specification; Swagger is a tool family. An OpenAPI document describes an HTTP API in a standard format. Swagger UI renders that document, Swagger Editor helps you write and validate it, and Swagger Codegen can generate client libraries or server stubs. The names overlap for historical reasons: the format once known as Swagger 2.0 became the basis for the OpenAPI Specification. That’s why an older definition might start with swagger: '2.0', whereas an OpenAPI 3.x document uses the openapi field.
From a file to an interactive page
Swagger UI reads an OpenAPI document in JSON or YAML and groups its operations by path or tag. You can expand an operation to inspect its parameters, request body, response codes, and schemas, when those are documented. Select Try it out, enter any required values, and click Execute to send an actual HTTP request to the selected API server. If it works from a command-line client but not from the browser, check whether the API allows cross-origin requests from the documentation site.
Teams create the document in different ways. In a design-first workflow, they write and review the contract before implementing it. In a code-first workflow, a framework or plugin produces the document from routes, types, or annotations. Swagger UI can display either one; it doesn't care how the file was produced.
Example: checking a documented response
openapi: 3.0.3
info:
title: Books API
version: '1.0.0'
paths:
/books:
get:
summary: List books
responses:
'200':
description: Book list returned successfully
Swagger UI displays GET /books with a documented 200 response. It can also show the response from a live request. Those are separate things: if the server returns 503, that is what happened on this call, even though the document only lists 200. This example doesn't describe the response body. To tell clients what a successful JSON result looks like, add content with an application/json media type and a schema.
Where it helps and where it stops
API consumers use Swagger UI to learn the contract, while developers and QA engineers use it for quick manual checks against a running service. It is not a mock server or a test suite. A successful call does not establish that error cases are documented or that existing clients will survive the next change. And a request that changes data really does run against the selected server, so use a test environment for experiments that create, update, or delete records.
In a backend interview
Be ready to explain how you'd keep the docs and implementation in sync. “We generate Swagger” isn't enough: a generator might pick up the success response but miss an error branch. A stronger answer distinguishes validating the OpenAPI document in CI, reviewing contract changes for compatibility, and testing the API's actual response codes and bodies.