Last updated


A server object to be used by the target operation.

Type: List of Server Objects

Field NameTypeDescription
urlstringREQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions are made when a variable is named in { curly braces }.
descriptionstringAn optional string describing the host designated by the URL.
variablesMap[string, Server Variable Object]A map between a variable name and its value. The value is used for substitution in the server's URL template.

Servers can be defined at the definition root and also at the path item level. The path item servers, if defined, take precedence over the definition root servers.


Example with a single server

The following example is of a single server.

  - url:

Example with two servers

  - url:
  - url:

two servers

Example with description

  - url:
    description: Production
  - url:
    description: Sandbox

two servers with descriptions

The servers can be displayed in the center panel by setting the pathInMiddlePanel: true option.

server urls with descriptions


  • ServerList
  • Server
  • ServerVariable