What does the OpenAPI validator check?
It enforces the structural rules an OpenAPI 3.0 / 3.1 spec must satisfy: openapi version field, info.title and info.version, at least one path, every operation having a responses block with a 1xx/2xx success or "default" status, all local $refs resolving to a target inside #/components/, and security schemes declaring valid type plus type-specific required fields (name+in for apiKey, scheme for http, flows for oauth2, openIdConnectUrl for openIdConnect).
How is $ref resolution performed?
For local refs (those starting with #/), the validator splits the JSON Pointer and walks the parsed document. If any segment is missing — typo in the path, schema not yet defined, wrong section — an error is emitted with the unresolvable ref. External refs (file paths or URLs) are flagged as warnings because their target document is not loaded.
Why must every operation have a responses block?
OpenAPI requires it. The responses object tells consumers what HTTP status codes the endpoint can return and what each response body looks like. Without it, code generators cannot emit method signatures, contract testers cannot assert on responses, and Swagger UI shows an empty operation. Add at least one entry — typically "200" with a description.
What security scheme types are supported?
OpenAPI 3.x defines five: apiKey (key in header/query/cookie), http (Basic, Bearer, Digest), oauth2 (with flows), openIdConnect (Discovery URL), and mutualTLS. The validator confirms the type field uses one of these and enforces the type-specific required fields. A bearer JWT for example is type: http with scheme: bearer.
How is OpenAPI 3.0 different from 3.1?
3.1 (released 2021) aligns the schema dialect with full JSON Schema 2020-12 — meaning your OpenAPI schemas can use the same dialect as JSON Schema validators. 3.0 uses a custom subset. 3.1 also adds webhooks (top-level webhooks: object) and allows null in type via type: ["string", "null"]. This validator handles both versions.
Will my spec be uploaded to a server?
No. Validation runs entirely in JavaScript inside your browser. Specs containing example tokens, internal hostnames, or proprietary endpoints stay on your device. Verify in your browser DevTools Network tab — no request is made when you click Validate.
How does this differ from the Swagger Validator?
The Swagger Validator is permissive and accepts both Swagger 2.0 and OpenAPI 3.x with universal structural rules. The OpenAPI Validator is OpenAPI 3.0/3.1-specific and adds $ref resolution, security scheme validation, and stricter response-status checks. Use this one for new APIs; use Swagger Validator for legacy 2.0 specs.
What does "External $ref not validated" mean?
When a $ref points outside the current document — to another file (./schemas/Pet.yaml#/Pet) or a URL (https://example.com/specs/pet.yaml) — the validator cannot fetch the target without making a network request. It surfaces a warning so you know the ref was acknowledged but not resolved. To check external refs, run swagger-cli bundle locally first.