@Version(value="1.0")
See: Description
| Interface | Description |
|---|---|
| Server |
An object representing a server.
|
| ServerVariable |
An object representing a Server Variable for server URL template substitution.
|
| ServerVariables | Deprecated
since 1.1, a future version will remove this and replace it with a
Map<String, ServerVariable>, because it does not
need to be extensible |
The behaviour of methods inherited from java.lang.Object are undefined by the MicroProfile OpenAPI specification.
Example usage:
Override
public OpenAPI buildModel() {
return OASFactory.createObject(OpenAPI.class)
.servers(new ArrayList<Server>())
.addServer(OASFactory.createObject(Server.class)
.url("https://{username}.gigantic-server.com:{port}/{basePath}")
.description("The production API server")
.variables(OASFactory.createObject(ServerVariables.class)
.addServerVariable("username", OASFactory.createObject(ServerVariable.class)
.defaultValue("user1")
.description("Reviews of the app by users")
.enumeration(new ArrayList<String>())
.addEnumeration("user1")
.addEnumeration("user2")))
Copyright © 2017 – 2021 Eclipse Foundation. All rights reserved.
Use is subject to license terms.