When a Server annotation appears on a method the server is added to the corresponding OpenAPI operation servers field.
When a Server annotation appears on a type then the server is added to all the operations defined in that type except for those operations which already have one or more servers defined. The server is also added to the servers defined in the root level of the OpenAPI document.
This annotation is Repeatable.
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: description of the host designated by URLAn optional string describing the host designated by the URL. |
| public Extension[] | Returns: array of extensionsList of extensions to be added to the |
| public String | |
| public ServerVariable[] | Returns: array of variablesAn array of variables used for substitution in the server's URL template. |
| description | back to summary |
|---|---|
| public String description() An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.
| |
| extensions | back to summary |
|---|---|
| public Extension[] extensions() List of extensions to be added to the
| |
| url | back to summary |
|---|---|
| public String url() 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 definition is being served. Variable substitutions will be made when a variable is named in {brackets}. This is a REQUIRED property.
| |
| variables | back to summary |
|---|---|
| public ServerVariable[] variables() An array of variables used for substitution in the server's URL template.
| |