LLMpediaThe first transparent, open encyclopedia generated by LLMs

OpenAPI Specification

Generated by DeepSeek V3.2
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: Mermaid (software) Hop 4
Expansion Funnel Raw 83 → Dedup 60 → NER 16 → Enqueued 15
1. Extracted83
2. After dedup60 (None)
3. After NER16 (None)
Rejected: 44 (not NE: 44)
4. Enqueued15 (None)
Similarity rejected: 1
OpenAPI Specification
NameOpenAPI Specification
StatusPublished
Version3.1.0
Year2021
OrganizationOpenAPI Initiative
Related standardsJSON Schema, AsyncAPI, RAML
DomainAPI description

OpenAPI Specification. It is a vendor-neutral, open standard for describing RESTful APIs using a JSON or YAML format. Originally based on the Swagger framework, it provides a language-agnostic interface to HTTP-based services, enabling both humans and computers to discover and understand API capabilities without access to source code. The specification is stewarded by the Linux Foundation's OpenAPI Initiative, a consortium that includes major technology firms.

Overview

The primary function is to define a standard, machine-readable description for web APIs, detailing available endpoints, operations, parameters, authentication methods, and contact information. This description serves as the foundational contract between an API provider and its consumers, facilitating automated tooling for tasks like documentation generation, SDK creation, and testing. By providing a single source of truth, it promotes consistency across the API lifecycle, from design and building to maintenance. Its structure is inherently extensible, allowing for custom metadata and integration with other open standards.

History and development

The specification originated from the Swagger project, created by Tony Tam and the team at Wordnik in 2010 to solve internal API documentation challenges. In 2015, the project's assets were donated to the newly formed OpenAPI Initiative under the Linux Foundation, with founding members including Google, IBM, and Microsoft. This move transitioned it from a proprietary SmartBear Software tool to a collaborative, vendor-neutral open standard. Major version 3.0.0 was released in 2017, introducing significant structural improvements, and version 3.1.0, released in 2021, brought full alignment with JSON Schema draft 2020-12. The evolution has been heavily influenced by feedback from the API developer community and the needs of large-scale enterprise adopters.

Specification structure

A document is composed of several root objects, with the essential `info` object containing metadata like the API title, version, and license. The `paths` object is central, defining each available endpoint and the HTTP operations, such as GET or POST, that can be performed on them. Each operation can detail parameters, request bodies, and possible responses. The `components` object allows for the reuse of schemas, parameters, and security schemes across the document. Support for OAuth and API key authentication is defined within the `securitySchemes`, and the overall server configuration, including base URLs, is specified separately.

Tools and implementations

A vast ecosystem of open-source and commercial tools has emerged to leverage machine-readable descriptions. For documentation, projects like Swagger UI and Redoc automatically generate interactive browser-based interfaces. Code generation tools, such as OpenAPI Generator and Microsoft's AutoRest, can produce client SDKs in languages like Java, Python, and C#. On the server side, frameworks like Express.js and Spring Framework can use it to route requests and validate incoming data. API gateways from AWS, Google Cloud Platform, and Kong utilize it for traffic management and policy enforcement.

It exists within a broader landscape of API description formats and complementary standards. AsyncAPI is a closely related specification built on a similar foundation but designed for event-driven and messaging APIs, such as those using MQTT or Apache Kafka. The JSON Schema standard is a core dependency for defining data models. Historically, it competed with other description languages like RAML, developed by MuleSoft, and API Blueprint. For modeling complex business processes that orchestrate multiple APIs, the BPMN standard is sometimes used in conjunction. Its alignment with the Open Connectivity Foundation's work also highlights its role in the IoT domain.

Category:Application programming interfaces Category:Web development Category:Technical communication Category:Linux Foundation projects