OpenAPI validator for YAML and JSON

OpenAPI is a standard, machine-readable format for describing an HTTP API's paths, operations, parameters, request bodies, responses and schemas, written in YAML or JSON.

Paste an OpenAPI 3.x or Swagger 2.0 description in YAML or JSON and check its structure, operations, responses, operationIds and internal $ref links.

Browser-sideNo accountCopy, download, or print

Last reviewed

Your inputs are saved as a draft in this browser only. Nothing is uploaded.

Jump to result
Interactive workspace

Inputs

Up to 200,000 characters. External $refs are listed, not fetched.

Result

More export options

VersionOpenAPI 3.0.3
ResultValid structure
Errors0
Warnings0
Operations2

Checks structure, operations, parameters, security names and internal $refs. Schemas are not validated against JSON Schema, and external $refs are not fetched.

Operations

MethodPathoperationIdSummary
GET/orderslistOrdersList orders
GET/orders/{orderId}getOrderGet one order by its id
OpenAPI 3.0.3: Orders API (YAML)
No errors found. 0 warnings.

2 operations:
GET /orders (listOrders)
GET /orders/{orderId} (getOrder)

Examples

Broken $ref

A response that points to #/components/schemas/Order when the schema is named Orders is reported with the location of the reference, so you can fix the name.

Duplicate operationId

Two operations both called listOrders are flagged. Code generators use operationId for method names, so each must be unique.

Path parameter not declared

/orders/{orderId} with no parameter named orderId in the path is reported, because every template variable must be defined as a path parameter.

Operation without responses

An operation with no responses object is an error in OpenAPI 3.0 and Swagger 2.0, and the result points to it.

External references

A $ref to another file, such as ./schemas/order.yaml, is listed but not fetched, because nothing leaves your browser.

How to use it

  1. Paste the OpenAPI or Swagger description, in YAML or JSON.
  2. Run the check.
  3. Read the errors and warnings, each with its location in the document.
  4. Review the list of endpoints, fix the description, and run it again.

Questions

Which versions does it support?
OpenAPI 3.0, 3.1 and 3.2, and Swagger 2.0, in YAML or JSON.
What does it check?
The required top-level fields, paths and operations, responses, unique operationIds, path template parameters, security requirement names, server URLs and internal $ref links.
Does it validate my schemas fully?
No. It checks the structure of the description, not each schema against the JSON Schema meta-schema, and it does not check that examples match their schemas. Run a full linter in your build for that.
Does it call my API?
No. It reads only the description you paste. It does not send requests to the servers listed in it.
What about $refs to other files or URLs?
They are listed so you can see what the description depends on, but they are not fetched or checked.
Which YAML features work?
The YAML that API descriptions use, including anchors, aliases, merge keys and block scalars. Files with more than one YAML document are not supported.
Is my API description uploaded?
No. The check runs entirely in your browser and nothing is uploaded.