AIWalay Tools

OpenAPI Validator

Validate an OpenAPI or Swagger spec (JSON or YAML) in your browser — checks required fields, structure and paths, with a clear summary.

About the OpenAPI Validator

This OpenAPI validator checks the structure of an OpenAPI 3.x or Swagger 2.0 specification, accepting either JSON or YAML. It confirms the required top-level fields are present and well-formed — the version declaration, the info block with title and version, and the paths object — and reports any missing or malformed pieces with a clear summary.

Catching structural mistakes early — before you generate clients, spin up mock servers or publish docs — saves debugging later. The validator also summarises the spec: how many paths and operations it defines, so you can sanity-check coverage at a glance.

Parsing and validation run entirely in your browser, so your API definition is never uploaded. It handles both the JSON and YAML forms teams commonly keep specs in.

How to Use the OpenAPI Validator

  1. 1Paste your OpenAPI or Swagger spec (JSON or YAML).
  2. 2Click Validate to parse and check its structure.
  3. 3Review any errors and the spec summary (paths, operations).
  4. 4Fix the spec and re-validate.

Frequently Asked Questions

Which OpenAPI versions are checked?

Both OpenAPI 3.x (identified by the openapi field) and Swagger 2.0 (identified by the swagger field). The validator detects which you've provided and checks the required fields for that version — for 3.x that's openapi, info (with title and version) and paths.

What does the validator check?

The core structural requirements: a valid version declaration, an info object with title and version, and a paths object, plus that the document parses as valid JSON or YAML. It reports missing required fields and gives a summary of the paths and operations defined.

Does it do full schema validation?

It focuses on the required top-level structure and common mistakes rather than validating every nested schema, parameter and reference against the complete OpenAPI meta-schema. It's a fast first-pass check; for exhaustive linting use a dedicated tool like Spectral in your pipeline.

Can I paste YAML or only JSON?

Both. Many teams write OpenAPI specs in YAML for readability, so the validator parses YAML as well as JSON. It converts YAML internally and then checks the same structure either way.

Is my API spec uploaded?

No. Parsing and validation happen entirely in your browser, so your specification is never sent to a server. It's safe for internal or unpublished APIs.

Related Tools