Contribute to this page
This documentation is Open source. If you have any feedback, suggestions, or want to contribute, check out our GitHub repo (opens in a new tab).
OpenAPI Hub
The all in one resource for understanding the OpenAPI Specification.
API Framework Guides
OpenAPI Overview
openapi
The version of the OpenAPI Specification that the document conforms to, should be one of the supported versions (opens in a new tab).
Note: Speakeasy tooling currently only supports OpenAPI Specification versions 3.0.x and 3.1.x.
info
Contains information about the document including fields like title
, version
, and description
that help to identify the purpose and owner of the document.
servers
Contains an optional list of servers the API is available on. If not provided, the default URL is assumed to be /
, a path relative to where the OpenAPI document is hosted.
security
Contains an optional list of security requirements that apply to all operations in the API. If not provided, the default security requirements are assumed to be []
, an empty array.
tags
Contains an optional list of tags that are generally used to group or categorize a set of Operations.
paths
Contains the paths and operations available within the API.
components
Contains an optional list of reusable schemas that can be referenced from other parts of the document. This improves the readability and maintainability of the document by allowing common schemas to be defined once and reused in multiple places.
openapi: 3.1.0info:title: The Speakeasy Barversion: 1.0.0servers:- url: https://speakeasy.bardescription: The production serversecurity:- apiKey: []tags:- name: drinksdescription: Operations related to drinkspaths:/drinks:get:tags:- drinksoperationId: listDrinkssummary: Get a list of drinksresponses:"200":description: A list of drinkscontent:application/json:schema:type: arrayitems:$ref: "#/components/schemas/Drink"components:schemas:Drink:type: objecttitle: Drinkproperties:name:type: stringprice:type: numbersecuritySchemes:apiKey:type: apiKeyname: Authorizationin: header
The OpenAPI Ecosystem
Understand the different specifications that make up the OpenAPI ecosystem