OpenAPI / Swagger Validator
Check your OpenAPI 3.x or Swagger 2.0 specification for missing required fields and common errors.
Ready.
About the OpenAPI / Swagger Validator
The OpenAPI Specification (OAS) is the world's most widely used standard for describing REST APIs. Valid OpenAPI documents enable automatic SDK generation, interactive documentation (Swagger UI, Redoc), contract testing, and API mocking. This tool validates your spec against OpenAPI 3.x and Swagger 2.0 structural requirements.
OpenAPI 3.x Required Fields
openapi — version string (e.g., "3.0.3") | info — API metadata (must include title and version) | paths — at least one path object (or components for schema-only specs)
Swagger 2.0 Required Fields
swagger — version string ("2.0") | info — API metadata | paths — API endpoint definitions | host and basePath — server location
Common Validation Errors
Missing operationId: Each operation should have a unique operationId — many SDK generators use this as the method name. Invalid $ref: References like $ref: '#/components/schemas/User' must point to an existing definition. Missing response definitions: Every operation must define at least one response. Parameter name collisions: Path, query, header, and cookie parameters must have unique names within an operation.
Tools That Use OpenAPI Specs
Swagger UI / Redoc: Interactive API documentation browsers. OpenAPI Generator: Generate client SDKs in 50+ languages from your spec. Prism: API mock server that serves example responses from your spec. Spectral: OSS linter for OpenAPI with customizable rule sets. Dredd: Contract testing tool that verifies your implementation matches the spec.