Package io.muserver.openapi
Class ServerObjectBuilder
- java.lang.Object
-
- io.muserver.openapi.ServerObjectBuilder
-
public class ServerObjectBuilder extends java.lang.ObjectAn object representing a Server.
-
-
Constructor Summary
Constructors Constructor Description ServerObjectBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerObjectbuild()static ServerObjectBuilderserverObject()Creates a builder for aServerObjectServerObjectBuilderwithDescription(java.lang.String description)ServerObjectBuilderwithUrl(java.lang.String url)ServerObjectBuilderwithVariables(java.util.Map<java.lang.String,ServerVariableObject> variables)
-
-
-
Method Detail
-
withUrl
public ServerObjectBuilder withUrl(java.lang.String url)
- Parameters:
url- REQUIRED. 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 will be made when a variable is named in{brackets}.- Returns:
- The current builder
-
withDescription
public ServerObjectBuilder withDescription(java.lang.String description)
- Parameters:
description- An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.- Returns:
- The current builder
-
withVariables
public ServerObjectBuilder withVariables(java.util.Map<java.lang.String,ServerVariableObject> variables)
- Parameters:
variables- A map between a variable name and its value. The value is used for substitution in the server's URL template.- Returns:
- The current builder
-
build
public ServerObject build()
- Returns:
- A new object
-
serverObject
public static ServerObjectBuilder serverObject()
Creates a builder for aServerObject- Returns:
- A new builder
-
-