
Validate OpenAPI 3 / Swagger Specs Online Before CI
Schema errors, broken $ref, missing responses: validate your OpenAPI 3.0–3.2 API contract in the browser.
Why validate an OpenAPI spec before merging?
An invalid OpenAPI spec blocks client generators, fails API gateway imports, and delays contract reviews. Yet the most common issues — incomplete info, broken internal $ref, unsupported openapi version — often hide in a 500-line YAML diff. FastMinify's online OpenAPI validator checks OpenAPI 3.0, 3.1, and 3.2 schema conformance via @scalar/openapi-parser, entirely in your browser. Paste JSON or YAML: verdict, error paths, and spec stats appear with no server upload. Pair it with the OpenAPI formatter for readable reviews, then explore the API tools hub. If raw JSON syntax is suspect, start with the JSON validator; to optimize payloads once the contract is sound, see our REST API performance guide.
Honest limits and best practices
A "valid" verdict means OpenAPI schema conformance — not that your API responds correctly in production.
$ref URLs#/ references are checked by Scalar. HTTP(S) references to other files are never resolved — the spec must be self-contained for reliable browser validation.
$ref may pass parse but fail elsewhereThe browser tool speeds feedback before commit; CI remains the source of truth for teams.
git push — faster than a full pipelineOpenAPI 3 vs Swagger 2: what the tool checks (and rejects)
OpenAPI 3.x describes REST endpoints, request/response schemas, security, and reusable components. FastMinify validates conformance to the OpenAPI meta-schema — not your API's runtime behavior.
3.0.x, 3.1.x, 3.2.xopenapi, info.title, info.version, pathsschemas, responses, parameters — internal refs resolvedDocuments with a root swagger: "2.0" key are not supported by this tool. The error message is explicit — do not try to validate them here.
swagger; OpenAPI 3 uses openapiBeyond syntax, these structural gaps break CI or SDK generators.
$ref pointing to a missing component — validation failuredescription — OpenAPI rule violationoperationId — blocks some generatorstype incompatible with poorly nested nullable / oneOfThree distinct intents on the API hub — don't confuse them during PR review.
Validate an OpenAPI spec: step-by-step workflow
The OpenAPI validator parses input (JSON or YAML, max 512 KiB), then calls Scalar validate(). Result: status, first error with line when known, issue list with JSON Pointer paths.
The OpenAPI formatter pretty-prints JSON or YAML (2 or 4 space indent, optional key sort). Useful for human review — it does not replace validate.
You export a spec from a design tool and AWS API Gateway / Kong import fails with no detail.
Step 1: Paste into validate-openapi
Open validate-openapi. If parse fails, fix JSON/YAML syntax first — the JSON validator can help on JSON portions.
Step 2: Fix internal $ref
Scalar issues list the path (missing #/components/schemas/User, etc.). Fix the typo or add the referenced component.
Step 3: Format and commit
Run the validated spec through format-openapi, download, open the PR. Re-import into the gateway.
The mobile team generates a client from the spec — a schema error blocks the entire pipeline.
Step 1: Validate the merged version
Paste the main branch spec into validate-openapi. Invalid verdict → block the release tag.
Step 2: Check info and paths
Complete info fields, every operation has responses with description. Results panel stats help spot empty paths.
Step 3: Minify embedded JSON examples
Bulky embedded examples slow reviews — use the JSON minifier on example payloads once the spec is valid.
Conclusion
Validating an OpenAPI spec before CI saves hours debugging gateway imports or silent SDK generators. Paste, validate, fix Scalar paths — all locally. Format for review, then explore the API hub for lint, JSON Schema conversion, and GraphQL validation.
Related Articles

K8s, CI/CD, Ansible configs: convert JSON ↔ YAML without losing structure or types.

Format, diff two API responses and explore deep JSON — a no-install debug workflow.

Trailing commas, single quotes, Excel exports: diagnose and fix broken JSON before it reaches production.