OpenAPI 3.1 Spec Validator
Paste your OpenAPI YAML or JSON to get instant validation with errors, warnings, and auto-fix suggestions. Supports OpenAPI 3.1, 3.0, and Swagger 2.0. Checks $ref resolution, operationIds, deprecated nullable patterns, and JSON Schema alignment.
Frequently Asked Questions
What is OpenAPI 3.1 and how does it differ from 3.0?▼
OpenAPI 3.1.0 (released February 2021) aligns fully with JSON Schema 2020-12, whereas 3.0 used a custom subset. Key differences: (1) nullable is replaced by type arrays like type: [string, null], (2) webhooks object added for async event definitions, (3) pathItems can be reused via $ref in paths, (4) schema composition (anyOf, oneOf, allOf) is more powerful, (5) info.license now supports SPDX expression identifiers.
What does the 'nullable: true' warning mean?▼
In OpenAPI 3.0, nullable: true was the way to allow null values for a field. In OpenAPI 3.1, this is removed in favor of the standard JSON Schema approach: use type: ['string', 'null'] (or any base type + 'null'). The validator flags nullable: true as a warning in 3.1 specs and suggests the correct replacement.
Why should every operation have an operationId?▼
operationId is used by SDK generators (openapi-generator, swagger-codegen), documentation tools, and API gateways to name methods and functions. Without it, generators create ugly names like 'getApiV1Users'. A good operationId is camelCase, unique across your spec, and describes the action: listUsers, createUser, getUserById.
Does this validator support YAML and JSON?▼
Yes. Paste your spec in either YAML or JSON format — the validator auto-detects the format. Both OpenAPI 3.1, 3.0, and Swagger 2.0 are supported, with upgrade suggestions when using older versions.
How does $ref validation work?▼
The validator resolves all internal $ref references (those starting with #/) and checks that the target path exists in the spec. External $refs (pointing to other files or URLs) are not resolved since this is a browser-based tool, but they are detected and reported.
What are auto-fix suggestions?▼
For each validation error or warning, the validator provides a concrete fix suggestion. For example: 'Missing info.version → Add version: 1.0.0', or 'nullable:true → Replace with type:["string","null"]'. Toggle 'Show fixes' in the results panel to see or hide them.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
JSON Diff Viewer
Free JSON diff viewer. Compare two JSON objects side-by-side with color-coded highlights: added lines in green, removed in red. Auto-formats JSON before comparing. Runs in your browser — your data nev
Open free tool →
JSON Diff
Free JSON diff tool. Compare two JSON objects side-by-side with color-coded highlights: added lines in green, removed in red. Auto-formats JSON before comparing. Runs in your browser — your data never
Open free tool →
OpenAPI Validator
Paste your OpenAPI 3.x spec (YAML or JSON) to validate structure, find missing required fields, detect duplicate paths, check for missing operationIds, and get errors and warnings with path references.
Open free tool →
More Free Tools
Related Articles
JSON vs YAML Developer Guide 2025: When to Use Each Format
JSON vs YAML: a practical developer guide covering syntax differences, use cases, performance, tooling, and conversion. Know exactly when to choose each format.
curl 深度使用手冊:API 測試從入門到進階
curl 是每位開發者必備的 CLI 工具。本文涵蓋 GET/POST/PUT/DELETE 請求、認證、header 設定、檔案上傳、除錯技巧,以及 REST API 測試的完整實戰範例。
GraphQL Federation vs REST Microservices: Which Architecture in 2026?
Compare GraphQL Federation vs REST microservices — Apollo Federation, schema stitching, performance, team scaling, migration paths, and when to choose each in 2026.
OpenAPI 3.1 vs Swagger 2.0: The Complete API-First Development Guide for 2026
Everything you need to know about OpenAPI 3.1 vs Swagger 2.0: key differences, API-first development methodology, tooling ecosystem, code generation, contract testing, migration guide, and best practices for 2026.
tRPC vs GraphQL vs REST: Type-Safe APIs in 2026
Compare tRPC, GraphQL, and REST for building type-safe APIs in 2026. Covers DX, performance, bundle size, schema management, and when to use each approach.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →