Interface Server
-
- All Superinterfaces:
Constructible
,Extensible<Server>
public interface Server extends Constructible, Extensible<Server>
An object representing a server.- See Also:
- Server Object
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default Server
description(java.lang.String description)
This method sets the description property of a Server instance to the given description parameter and returns the modified instance.java.lang.String
getDescription()
This method returns the description property of Server instance.java.lang.String
getUrl()
This method returns the url property of Server instance, which is a URL to the target host.ServerVariables
getVariables()
This method returns the variables property of Server instance.void
setDescription(java.lang.String description)
This method sets the description property of a Server instance to the given description parameter.void
setUrl(java.lang.String url)
This method sets the url property of Server instance to the given url argument, representing a URL to the target host.void
setVariables(java.util.Map<java.lang.String,ServerVariable> variables)
This method sets the variables property of Server instance to the given variables argument.void
setVariables(ServerVariables variables)
Deprecated.since 1.1, usesetVariables(Map)
insteaddefault Server
url(java.lang.String url)
This method sets the url property of Server instance to the given url argument, representing a URL to the target host, and returns the modified instance.default Server
variables(java.util.Map<java.lang.String,ServerVariable> variables)
This method sets the variables property of Server instance to the given variables argument and returns the modified instance.default Server
variables(ServerVariables variables)
Deprecated.since 1.1, usevariables(Map)
instead-
Methods inherited from interface org.eclipse.microprofile.openapi.models.Extensible
addExtension, extensions, getExtensions, removeExtension, setExtensions
-
-
-
-
Method Detail
-
getUrl
java.lang.String getUrl()
This method returns the url property of Server instance, which is 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 enclosed in curly brackets.
This is a REQUIRED property.
- Returns:
- String url
-
setUrl
void setUrl(java.lang.String url)
This method sets the url property of Server instance to the given url argument, representing 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 enclosed in curly brackets.
This is a REQUIRED property.
- Parameters:
url
- a URL to the target host
-
url
default Server url(java.lang.String url)
This method sets the url property of Server instance to the given url argument, representing a URL to the target host, and returns the modified instance.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 enclosed in curly brackets.
This is a REQUIRED property.
- Parameters:
url
- a URL to the target host- Returns:
- Server instance with the set url property.
-
getDescription
java.lang.String getDescription()
This method returns the description property of Server instance. The decsription property is an optional string describing the host designated by the URL.- Returns:
- String description
-
setDescription
void setDescription(java.lang.String description)
This method sets the description property of a Server instance to the given description parameter.Description of a server is an optional string describing the host designated by the URL. CommonMark syntax can be used for rich text representation.
- Parameters:
description
- an optional string describing the host designated by the URL
-
description
default Server description(java.lang.String description)
This method sets the description property of a Server instance to the given description parameter and returns the modified instance.Description of a server is an optional string describing the host designated by the URL. CommonMark syntax can be used for rich text representation.
- Parameters:
description
- an optional string describing the host designated by the URL- Returns:
- Server instance with the set description property.
-
getVariables
ServerVariables getVariables()
This method returns the variables property of Server instance.Variables are represented as a map between variable name and its value. The value is used for substitution in the server's URL template.
- Returns:
- ServerVariables variables (in the future this method will instead return a
Map<String, ServerVariable>
).
-
setVariables
@Deprecated void setVariables(ServerVariables variables)
Deprecated. since 1.1, usesetVariables(Map)
insteadThis method sets the variables property of Server instance to the given variables argument.Variables property is a map between variable name and its value. The value is used for substitution in the server's URL template.
- Parameters:
variables
- a map between variable name and its value
-
setVariables
void setVariables(java.util.Map<java.lang.String,ServerVariable> variables)
This method sets the variables property of Server instance to the given variables argument.Variables property is a map between variable name and its value. The value is used for substitution in the server's URL template.
- Parameters:
variables
- a map between variable name and its value
-
variables
@Deprecated default Server variables(ServerVariables variables)
Deprecated. since 1.1, usevariables(Map)
insteadThis method sets the variables property of Server instance to the given variables argument and returns the modified instance.Variables property is a map between variable name and its value. The value is used for substitution in the server's URL template.
- Parameters:
variables
- a map between variable name and its value- Returns:
- Server instance with the set variables property.
-
variables
default Server variables(java.util.Map<java.lang.String,ServerVariable> variables)
This method sets the variables property of Server instance to the given variables argument and returns the modified instance.Variables property is a map between variable name and its value. The value is used for substitution in the server's URL template.
- Parameters:
variables
- a map between variable name and its value- Returns:
- Server instance with the set variables property.
-
-