OpenAPI Validator
Validate an OpenAPI or Swagger document locally: version, info title and version, paths starting with a slash, operations and their responses.
What the OpenAPI Validator does
JSON is tried first and YAML second, so either form works. Each path key is checked for a leading slash, each operation is matched against the eight HTTP verbs, and each one must declare responses; the report counts both so the output proves what was walked.
A path item with no operation is an error, because a path that answers nothing is usually a half-finished edit.
This is a structural validator, not a specification validator. It does not resolve $ref, check schemas, validate examples or check that parameters match a path template. A document that passes here can still fail a real validator.
How to use it
Paste the document into the OpenAPI document box, or press Run with the example already there.
Read the Validation report below: the version, title, path count and operation count.
Check a path you recently changed in the Validation report — a missing responses object is refused with the path and the verb.
Worked example
Input:
{
"openapi": "3.0.3",
"info": {
"title": "T",
"version": "1"
},
"paths": {
"/users": {
"get": {
"responses": {
"200": {
"description": "ok"
}
}
}
}
}
}
Output:
Valid: yes
Version: 3.0.3
Title: T
Paths: 1
Operations: 1
Why it runs in your browser
The result is produced on this page with JavaScript, so it works offline after the page loads and nothing you enter is sent anywhere.
A structural check of a pasted OpenAPI document: a version, an info block with a title and a version, paths that start with a slash, and every operation with a responses object.
The first problem is refused with its own path — `paths/users.get has no responses` — rather than as a generic invalid document.
What it does, and what it does not
JSON is tried first and YAML second, so either form works. Each path key is checked for a leading slash, each operation is matched against the eight HTTP verbs, and each one must declare responses; the report counts both so the output proves what was walked.
A path item with no operation is an error, because a path that answers nothing is usually a half-finished edit.
This is a structural validator, not a specification validator. It does not resolve `$ref`, check schemas, validate examples or check that parameters match a path template. A document that passes here can still fail a real validator.
How to use OpenAPI Validator
Paste the document into the OpenAPI document box, or press Run with the example already there.
Read the Validation report below: the version, title, path count and operation count.
Check a path you recently changed in the Validation report — a missing responses object is refused with the path and the verb.
What to Expect
Best for
- Catching a structural mistake before committing
- Counting the operations a document declares
Not ideal for
- Full specification validation, which needs a real validator
- Resolving $ref, which this page does not do
What this tool keeps
- The path and operation counts
- Every verb matched against the eight HTTP methods
What may need cleanup
- A $ref still needs resolving by your toolchain
- Schema validation needs a real validator
Common errors
- The page refuses it: path "users" must start with /
Example use cases
- Checking a hand-edited spec
- Reviewing a change to an API document
Sample input
OpenAPI document: { …
Sample output
Validation report: Valid: yes …
Who this is for
- API developers writing OpenAPI by hand
- Anyone reviewing an API change
Frequently asked questions
Does it validate schemas?
No. It checks the document's structure — version, info, paths, operations and responses. Schema and example validation needs a full validator.
Is YAML accepted?
Yes. JSON is tried first and YAML second, so either the .json or the .yaml form of the same document works.
What counts as an operation?
One of get, put, post, delete, options, head, patch or trace under a path. Anything else in a path item — parameters, summary — is not an operation.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.