Skip to content
All references

API reference

OpenAPI & Swagger: Open JSON or YAML

Open an API specification, read endpoints and diagnose common JSON or YAML problems with complete OpenAPI and Swagger examples.

Inspect an API description without making an API request

An OpenAPI description is a document about an API, not the API response itself. It can be written in JSON or YAML and can describe paths, operations, parameters and servers. Inspecting that document helps answer which operation is declared and what it expects, but it does not prove that a deployed server behaves according to the description.

Open a local file or paste the document, then start with its declared version and API information. Search by path, method or operation text and inspect the selected endpoint. The viewer supports declared Swagger 2.0 and OpenAPI 3.x operations, including the bounded local path-item references described below. It does not fetch arbitrary external references or act as an interactive request client.

  1. Check whether the root declares swagger or openapi. A random JSON response body is not automatically an API specification.
  2. Inspect the servers or Swagger host information, then find the desired path and HTTP method.
  3. Review parameters, request bodies and documented responses. Treat missing information as unknown rather than assuming a default contract.
  4. Download the filtered endpoint list as CSV when you need an inventory. Review the method, path and declared response codes; the export does not call the API.
  5. Keep authentication secrets out of a shared document. Export a reviewed local copy when you need to attach the description to a report.

Read a reusable local path definition

Example input

"/contacts": { "$ref": "#/components/pathItems/Contacts" }

Expected result

GET /contacts

When the same document defines the referenced Contacts path item with a GET operation, the viewer resolves that local path reference and displays GET /contacts. Use the complete local path reference example linked below to try the operation. The snippet here is only the paths entry; it is not a standalone OpenAPI document and does not demonstrate full schema-reference resolution.

Check before you continue

  • The viewer does not send a request to the documented server. To test real behavior, use an appropriate client with the required authorization.
  • A displayed operation is not a full conformance verdict. External references, schema constraints and deployment behavior need their own validation.
  • If a document fails to parse, check its JSON or YAML syntax before changing valid endpoint definitions. Keep a copy of the original while investigating.

9 of 9 entries

Getting started

Open a local specification

OpenAPI Viewer → Open JSON / YAML file → choose .json, .yaml or .yml
Alternatively, paste the specification and select Inspect specification.

Files up to 5 MiB are read in your browser. The viewer shows metadata and declared operations without uploading the file or calling your API.

References

Resolve a reusable local path item

{
  "openapi": "3.1.1",
  "info": {
    "title": "Contacts API",
    "version": "1.0.0"
  },
  "paths": {
    "/contacts": {
      "$ref": "#/components/pathItems/contactList"
    }
  },
  "components": {
    "pathItems": {
      "contactList": {
        "get": {
          "summary": "List contacts",
          "operationId": "listContacts",
          "tags": [
            "Contacts"
          ],
          "responses": {
            "200": {
              "description": "Contact list"
            }
          }
        }
      }
    }
  }
}

A path item can reuse an object under components.pathItems. The viewer follows local JSON Pointer references, detects missing or circular paths and never fetches external references. This is path-item inspection, not full schema resolution or OpenAPI conformance validation.

Try this example

Examples

Try a complete OpenAPI YAML example

openapi: 3.0.3
info:
  title: Inventory API
  version: 1.0.0
servers:
  - url: https://api.example.com/v1
paths:
  /items/{id}:
    get:
      summary: Find an inventory item
      operationId: getItem
      tags: [Inventory]
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Item found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Item'
        '404':
          description: Item not found
components:
  schemas:
    Item:
      type: object
      properties:
        id:
          type: string
        name:
          type: string

This example describes one GET operation, a required path parameter, two responses and a reusable schema. Expand the operation details to inspect its declarations.

Try this example

Examples

Try OpenAPI 3.1 JSON

{
  "openapi": "3.1.0",
  "info": {
    "title": "Health API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.example.com"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Check service health",
        "operationId": "getHealth",
        "tags": [
          "Monitoring"
        ],
        "responses": {
          "200": {
            "description": "Service is ready"
          }
        }
      }
    }
  }
}

The openapi field identifies the specification version; info.version identifies your API release. They describe different things and do not have to match.

Try this example

Examples

Try Swagger 2.0 JSON

{
  "swagger": "2.0",
  "info": {
    "title": "Catalog API",
    "version": "1.0.0"
  },
  "host": "api.example.com",
  "basePath": "/v1",
  "schemes": [
    "https"
  ],
  "paths": {
    "/products": {
      "get": {
        "summary": "List catalog products",
        "operationId": "listProducts",
        "tags": [
          "Catalog"
        ],
        "responses": {
          "200": {
            "description": "Product list"
          }
        }
      }
    }
  }
}

Swagger 2.0 uses swagger, host, basePath and schemes. The viewer recognizes this structure and lists the declared server and operations.

Try this example

Reading a specification

Find the endpoint you need

Search: getItem
Method: GET
Tag: Inventory
Operation: GET /items/{id}

Search paths, summaries and operation identifiers, then combine the search with method and tag filters. Clear the filters if an expected operation disappears.

Troubleshooting

Diagnose JSON and YAML syntax errors

JSON: use double-quoted keys and remove trailing commas.
YAML: check indentation and quote response codes such as "200".

Start with the reported syntax problem, then confirm that the document root is an object containing an openapi or swagger version field. A filename alone is not a specification.

Troubleshooting

Understand unresolved references

$ref: '#/components/schemas/Item'
$ref: './schemas/item.yaml'

The viewer shows references as written. It does not fetch separate files or fully resolve schemas. Bundle a multi-file specification with suitable tooling before a complete review.

Scope

Viewing is different from validation and testing

Viewer → read declared operations
Conformance validator → check specification rules
API client → send requests to a server

A successful preview does not certify OpenAPI conformance or prove an endpoint works. Downloaded normalized JSON preserves the parsed data; it does not convert Swagger 2.0 into OpenAPI 3.