Skip to main content

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.

✓ OpenAPI 3.1 / 3.0 / Swagger 2.0 ✓ Auto-fix suggestions ✓ $ref resolution ✓ Spec stats dashboard

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.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

JSON Diff Viewer JSON Diff OpenAPI Validator YAML Validator Pro YAML to JSON Converter JSON Formatter Pro JSON Path Finder YAML Diff Viewer CSV to JSON Converter JSON ↔ YAML Converter JSON Schema Form Builder OpenAPI Schema Validator Protobuf to JSON Converter CSV JSON Transformer OpenAPI Mock Generator JSON Schema to Zod Converter API Response Mock Generator API Response Time Tester JSON Formatter & Validator JSON Schema Generator JSON to CSV Converter YAML Validator & Formatter API Mock Server Config Generator YAML to TOML Converter TOML to JSON Converter API Test Case Generator API Request Builder API Response Formatter & Analyzer HTTP API Tester JSON to TypeScript Interface package.json Validator & Audit TOML to JSON Converter Helm Values Generator package.json Generator YAML to TOML Converter OpenAI Function Calling Generator API Rate Limit Calculator Kubernetes Manifest Generator LLM Cost Calculator GitHub Actions YAML Linter Kubernetes YAML Validator Helm Chart Linter Grafana Dashboard JSON Validator CI/CD Pipeline Generator AI Prompt Cost Calculator REST API Request Builder LLM Prompt Cost Calculator Mock Data Generator API Response Mocker LLM JSON Schema Builder Pulumi Stack Config Generator Helm Values Validator AI Rate Limit Calculator Grafana Dashboard JSON Builder Helm Chart Values Generator API Key Generator AI Doc Generator — Pro Tool Docker Compose Generator GitHub Actions Workflow Generator HTTP Methods Reference HTTP Code Snippet Generator HTTP Status Code Reference HTTP Status Code Reference JWT Builder JWT Decoder TOML Validator Rate Limiter Tester API Changelog Generator PWA Manifest Generator HTTP Mock Response Builder Fake Data Generator Rate Limit Calculator Biome Config Generator Package Lock Analyzer Feature Flag Config Generator CORS Policy Builder ArgoCD App Health Checker GCP Service Account Key Checker Azure ARM Template Validator OpenTelemetry Config Generator Prometheus Alert Rules Validator Zod Schema Generator SBOM Generator Kubernetes Resource Quota Calculator HTTP Status Code Lookup GitHub Actions Workflow Validator HTTP Status Code Lookup JWT Debugger Pro Vue Component Generator pnpm Workspace Generator K8s Resource Limits Calculator HTTP Status Code Reference TypeScript tsconfig.json Generator LLM Context Window Calculator LLM Token Counter OpenAPI Spec Validator Chrome Extension Manifest Generator Ansible Playbook Builder Prompt Token Estimator Helm Values Builder Terraform Variable Builder Mock Service Worker (MSW) API Mocking Guide Pulumi Modern IaC Guide MCP Endpoint Tester Ansible Playbook Linter ArgoCD Application Generator GitHub Actions Matrix Builder Kubernetes Resource Request Calculator GitHub Actions Cron Builder MCP Server Config Builder HTML5 Canvas API Playground Token Context Calculator LangGraph Workflow Visualizer CrewAI Agent Config Generator AWS IAM Policy Generator GCP Service Account Key Auditor Kubernetes RBAC Builder SWR Config Generator Expo App Config Generator Token Counter & Cost Estimator AI API Rate Limit Calculator LLM Prompt Template Builder NFT Metadata Generator

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$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.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →