Paths Object in OpenAPI
The paths
object is a map of Path Item Objects that describes the available paths and operations for the API.
Each path is a relative path to the servers defined in the Servers object, either at the document, path, or operation level. For example, if a server is defined as https://speakeasy.bar/api
and a path is defined as /drinks
, the full URL to the path would be https://speakeasy.bar/api/drinks
, where the path is appended to the server URL.
Example:
Path Item Object in OpenAPI
A Path Item Object describes the operations available on a single path. This is generally a map of HTTP methods to Operation Objects that describe the operations available.
It is possible to override the Servers defined at the document level for a specific path by providing a list of Server Objects at the path level.
It is also possible to provide a list of Parameters that are common to all operations defined on the path.
Example:
Or:
The order of fields above is recommended but is not significant to the order in which the endpoints should be used.
Last updated on