NEW
Also known as: OAS, Swagger Specification
A language-agnostic standard for describing HTTP APIs, covering endpoints, parameters, schemas, responses, and security.
DESCRIPTION
The OpenAPI Specification standardizes machine-readable API descriptions for HTTP services. It enables tooling for documentation, mock servers, client/server code generation, and contract testing. OAS integrates with JSON Schema for payload validation and supports multiple auth mechanisms. Versioned specifications enable API evolution and backward compatibility. Widely adopted across platforms, it promotes consistent API design and interoperability.
ALTERNATIVE DEFINITIONS
OpenAPI Initiative
The OpenAPI Specification defines a standard, language-agnostic interface description for HTTP APIs.
Formal definition stressing language-agnostic HTTP API description.
Swagger
The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for REST APIs.
Highlights RESTful APIs and vendor tooling ecosystem.
RELATED TERMS
REST API JSON Schema Swagger UI API Gateway Contract Testing API Documentation Postman Collections Versioning OAuth 2.0
COMPETING TERMS
RAML API Blueprint AsyncAPI
RELATIONS
- Broader: Specification
- Implemented by: API Contract
KNOWLEDGE AREAS
Data Integration & Interoperability Software Engineering Platform & Tooling Testing & Validation
TARGET AUDIENCE
Software Developer DevOps Engineer Data Engineer Data Architect Enterprise Architect Cloud Architect
EXTERNAL SOURCES
- Wikipedia - OpenAPI Specification
- OpenAPI Initiative - Specification repository and issues
- Red Hat - Vendor overview of OpenAPI
- Microsoft Learn - Import OAS into API Management
TOP QUESTIONS
Why use OpenAPI Specification for your REST API?
OAS enables machine-readable contracts, generating docs, mocks, and client/server code. It reduces integration friction and enforces consistent design.
Category: Relevancy
What is the biggest misunderstanding about OpenAPI Specification?
Many think OAS is only documentation; it also powers validation, testing, and automation via contract-driven development.
Category: Misunderstanding
How does OpenAPI relate to JSON Schema?
OpenAPI uses JSON Schema vocabularies for describing request/response payloads, enabling robust validation and tooling.
Category: Example
What are common mistakes with OpenAPI?
Outdated specs, missing examples, inconsistent naming, and lack of reusable components lead to poor consumer experience.
Category: Mistakes
How do you version an OpenAPI Specification?
Use semantic versioning, deprecate carefully, and maintain multiple spec files for major versions to preserve backward compatibility.
Category: Best practices
What risks arise if you skip OpenAPI in API development?
Inconsistent endpoints, poor discoverability, and integration issues increase costs and defects. Missing contracts hinder automation.
Category: Risk
What are alternatives competing with OpenAPI Specification?
RAML and API Blueprint offer similar REST descriptions, while AsyncAPI targets event-driven APIs.
Category: Alternatives
How is OpenAPI used in CI/CD?
Validate specs, auto-generate stubs, and run contract tests in pipelines. Fail builds on breaking changes or schema violations.
Category: Testing
What is a hot topic around OpenAPI today?
API-first design, schema governance, and combining OAS with JSON Schema 2020-12 vocabularies are prominent trends.
Category: Topic