@Target(value={TYPE,METHOD}) @Retention(value=RUNTIME) @Repeatable(value=Servers.class) @Inherited public @interface Server
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
.
Note: If both Server
and
Servers
annotation are specified on the same
type, the server definitions will be combined.
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
description
An optional string describing the host designated by the URL.
|
java.lang.String |
url
A URL to the target host.
|
ServerVariable[] |
variables
An array of variables used for substitution in the server's URL template.
|
public abstract java.lang.String url
public abstract java.lang.String description
public abstract ServerVariable[] variables