OpenAPI structure check

Check required OAS 3.0 object shape: openapi, info, and paths. This is not Spectral, Redocly, $ref resolution, or OAS 3.1 security-scheme rules.

Reviewed by Olgun Ozoktas

OpenAPI specification

Structure only

This check looks at required OAS 3.0 object shape (openapi, info, paths). It does not run Spectral or Redocly rules. It does not resolve $ref. It does not check OAS 3.1 security schemes. An empty paths object is a structure warning.

How to check OpenAPI structure

  1. 1

    Paste or upload your spec

    Enter your OpenAPI or Swagger specification into the editor. You can paste JSON or YAML directly, or click Upload File to load an.json.yaml, or.yml file from your device.
  2. 2

    Load a sample if needed

    Click Load Example to fill an OpenAPI 3.0 document with openapi, info, and paths. Use it to see the required object shape.
  3. 3

    Run the structure check

    Press Check structure. The tool parses JSON or simple YAML and reports missing required fields, path format, and empty paths. It does not resolve $ref or run Spectral rules.
  4. 4

    Review errors and warnings

    Errors mean a required object field is missing. Warnings include empty paths and missing operationId. Fix the document and run the check again.

Common Use Cases

1

API Design-First Workflow

Check that openapi, info, and paths are present before you generate stubs or docs. This is a shape check, not a Spectral lint.
2

CI/CD Pipeline Pre-Check

Use this page for a quick shape check of required fields. For rule-based lint in CI, use Spectral or Redocly.
3

Third-Party API Auditing

Paste a published spec to see whether required object fields exist and whether paths is empty. It does not list missing response schemas or unresolved $ref.
4

Swagger 2.0 to OpenAPI 3.x Migration

Run a structure check on a Swagger 2.0 file, convert it with Swagger to OpenAPI, then run the structure check again.

Why use OpenAPI structure check?

Use this page to confirm the required OAS 3.0 object fields: openapi, info (title and version), and paths. Empty paths {} is a warning, not a full API. For Spectral or Redocly lint, use those tools.

OpenAPI structure check reads an OpenAPI 3.x or Swagger 2.0 document in your browser. It checks required object fields: openapi (or swagger), info.title, info.version, and paths. Empty paths {} is a structure warning. The check does not run Spectral or Redocly rules. It does not resolve $ref. It does not apply OAS 3.1 security-scheme rules.

Use this page for a first shape check before you generate docs or client code. For a full lint, use Spectral or Redocly. For YAML indent problems, use the YAML Validator. The Swagger to OpenAPI Converter upgrades Swagger 2.0 files. Then run this structure check again.

After the shape is present, generate docs with the API Docs Generator, or check JSON Schema with the JSON Schema Validator. Processing stays in this browser. The page does not upload your specification.

How It Compares

Spectral and Redocly run rule sets, resolve $ref, and check many OAS details. This page does not replace them. It checks required OAS 3.0 object shape in the browser so you can see missing openapi, info, or paths fields at once.

Stoplight Studio and SwaggerHub combine editors with lint. This page is a free shape check with no account. For JSON Schema, use the JSON Schema Validator. For YAML syntax, use the YAML Validator.

Tips for Writing Valid OpenAPI Specs

1
Include the required top-level fields: openapi (version string), info (with title and version), and paths. Missing any of these fails the structure check.
2
An empty paths object is a warning. Add at least one path item before you treat the document as a usable API.
3
Define a responses object for every operation. This check flags operations that lack responses.
4
Run this structure check first. Then run Spectral or Redocly for rule-based lint and $ref resolution.
5
Format JSON or YAML before the check. Parser errors hide the structure report.

FAQ

1

What OpenAPI versions are supported?

This structure check reads OpenAPI 3.x and Swagger 2.0 documents. It checks required object fields. It does not implement OAS 3.1 JSON Schema or security-scheme rules.
2

Can I check YAML specifications?

Yes. Paste JSON or simple YAML, or upload a .json, .yaml, or .yml file. The YAML reader is basic. Complex YAML (anchors, aliases) may need JSON first.
3

What does this check detect?

It reports missing openapi or swagger, missing info.title, missing info.version, missing paths, paths that do not start with /, operations without responses, and empty paths as a warning. It does not resolve $ref or run Spectral rules.
4

Does this OpenAPI validator require a signup?

No. It is available with no signup, no usage limits. All validation runs in your browser, so your API specifications are never sent to any server.
5

Is my API specification safe when validating online?

Absolutely. The validation engine runs entirely client-side in your browser. Your specification data never leaves your device, making it safe for proprietary or confidential API designs.
6

What is the difference between errors and warnings?

Errors mean a required object field is missing. Warnings flag extra structure notes, such as empty paths or a missing operationId. A warning does not mean Spectral lint passed.
7

Does this tool resolve $ref?

No. This check does not resolve $ref pointers, inside the file or across files. Use a bundler and a Spectral or Redocly lint for reference checks.
8

How large of a specification can I validate?

Since validation runs in your browser, the limit depends on your device's memory and processing power. Most modern browsers handle specifications with hundreds of paths and thousands of lines without any issues.
9

How do I check $ref pointers?

This page does not resolve $ref. Check that the pointer matches a local component, then use a bundler or Spectral for a full lint. The JSON Formatter can help you find the definition.
10

Can I convert my Swagger 2.0 spec to OpenAPI 3.x?

Yes. After validating your Swagger 2.0 document here, use the Swagger to OpenAPI Converter to upgrade it to OpenAPI 3.0. Then re-validate the converted output to confirm a clean migration with no leftover issues.

Rate This Tool

0/1000

Get Weekly Tools

Suggest a Tool