public class ServerObjectBuilder extends Object
Constructor and Description |
---|
ServerObjectBuilder() |
Modifier and Type | Method and Description |
---|---|
ServerObject |
build() |
static ServerObjectBuilder |
serverObject()
Creates a builder for a
ServerObject |
ServerObjectBuilder |
withDescription(String description) |
ServerObjectBuilder |
withUrl(String url) |
ServerObjectBuilder |
withVariables(Map<String,ServerVariableObject> variables) |
public ServerObjectBuilder withUrl(String url)
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}
.public ServerObjectBuilder withDescription(String description)
description
- An optional string describing the host designated by the URL. CommonMark syntax MAY be used for rich text representation.public ServerObjectBuilder withVariables(Map<String,ServerVariableObject> variables)
variables
- A map between a variable name and its value. The value is used for substitution in the server's URL template.public ServerObject build()
public static ServerObjectBuilder serverObject()
ServerObject
Copyright © 2017–2019. All rights reserved.