public interface OpenAPI extends Constructible, Extensible
This is the root document object of the OpenAPI document. It contains required and optional fields.
| Modifier and Type | Method and Description |
|---|---|
OpenAPI |
addSecurityRequirement(SecurityRequirement securityRequirement)
Adds the given security requirement to this OpenAPI instance's list of security requirements.
|
OpenAPI |
addServer(Server server)
Adds the given server to this OpenAPI instance's list of servers.
|
OpenAPI |
addTag(Tag tag)
Adds the given tag to this OpenAPI instance's list of tags.
|
OpenAPI |
components(Components components)
Sets this OpenAPI instance's components property to the given components.
|
OpenAPI |
externalDocs(ExternalDocumentation externalDocs)
Sets this OpenAPI instance's externalDocs property to the given object.
|
Components |
getComponents()
Returns the components property from an OpenAPI instance.
|
ExternalDocumentation |
getExternalDocs()
Returns the externalDocs property from an OpenAPI instance.
|
Info |
getInfo()
Returns the info property from an OpenAPI instance.
|
String |
getOpenapi()
Returns the openapi property from an OpenAPI instance.
|
Paths |
getPaths()
Returns the paths property from an OpenAPI instance.
|
List<SecurityRequirement> |
getSecurity()
Returns the security property from an OpenAPI instance.
|
List<Server> |
getServers()
Returns the Servers defined in the API
|
List<Tag> |
getTags()
Returns the tags property from an OpenAPI instance.
|
OpenAPI |
info(Info info)
Sets this OpenAPI instance's info property to the given object.
|
OpenAPI |
openapi(String openapi)
Sets this OpenAPI instance's openapi property to the given string.
|
OpenAPI |
path(String name,
PathItem path)
Adds the given path item to this OpenAPI instance's list of paths
|
OpenAPI |
paths(Paths paths)
Sets this OpenAPI instance's paths property to the given paths.
|
OpenAPI |
security(List<SecurityRequirement> security)
Sets this OpenAPI instance's security property to the given list.
|
OpenAPI |
servers(List<Server> servers)
Sets this OpenAPI instance's servers property to the given servers.
|
void |
setComponents(Components components)
Sets this OpenAPI instance's components property to the given components.
|
void |
setExternalDocs(ExternalDocumentation externalDocs)
Sets this OpenAPI instance's externalDocs property to the given object.
|
void |
setInfo(Info info)
Sets this OpenAPI instance's info property to the given object.
|
void |
setOpenapi(String openapi)
Sets this OpenAPI instance's openapi property to the given string.
|
void |
setPaths(Paths paths)
Sets this OpenAPI instance's paths property to the given paths.
|
void |
setSecurity(List<SecurityRequirement> security)
Sets this OpenAPI instance's security property to the given list.
|
void |
setServers(List<Server> servers)
Sets this OpenAPI instance's servers property to the given servers.
|
void |
setTags(List<Tag> tags)
Sets this OpenAPI instance's tags property to the given Tags.
|
OpenAPI |
tags(List<Tag> tags)
Sets this OpenAPI instance's tags property to the given tags.
|
addExtension, getExtensions, setExtensionsString getOpenapi()
void setOpenapi(String openapi)
openapi - the semantic version number of the OpenAPI Specification version that the OpenAPI document usesOpenAPI openapi(String openapi)
openapi - the semantic version number of the OpenAPI Specification version that the OpenAPI document usesInfo getInfo()
void setInfo(Info info)
info - metadata about the APIOpenAPI info(Info info)
info - metadata about the APIExternalDocumentation getExternalDocs()
void setExternalDocs(ExternalDocumentation externalDocs)
externalDocs - additional external documentation.OpenAPI externalDocs(ExternalDocumentation externalDocs)
externalDocs - additional external documentationList<Server> getServers()
void setServers(List<Server> servers)
servers - Server objects which provide connectivity information to target serversOpenAPI servers(List<Server> servers)
servers - Server objects which provide connectivity information to target serversOpenAPI addServer(Server server)
server - Server object which provides connectivity information to a target serverList<SecurityRequirement> getSecurity()
void setSecurity(List<SecurityRequirement> security)
security - which security mechanisms can be used across the APIOpenAPI security(List<SecurityRequirement> security)
security - which security mechanisms can be used across the APIOpenAPI addSecurityRequirement(SecurityRequirement securityRequirement)
securityRequirement - security mechanism which can be used across the APIList<Tag> getTags()
void setTags(List<Tag> tags)
tags - tags used by the specification with additional metadataOpenAPI tags(List<Tag> tags)
tags - tags used by the specification with additional metadataOpenAPI addTag(Tag tag)
tag - a tag used by the specification with additional metadataPaths getPaths()
void setPaths(Paths paths)
paths - the available paths and operations for the APIOpenAPI paths(Paths paths)
paths - the available paths and operations for the APIOpenAPI path(String name, PathItem path)
name - a path name in the format valid for a Paths objectpath - the path item added to the list of pathsComponents getComponents()
void setComponents(Components components)
components - a set of reusable objects used in the API specificationOpenAPI components(Components components)
components - a set of reusable objects used in the API specificationCopyright © 2018. All rights reserved.