public interface OpenAPI extends Constructible, Extensible<OpenAPI>
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.
|
default OpenAPI |
components(Components components)
Sets this OpenAPI instance's components property to the given components.
|
default 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.
|
java.lang.String |
getOpenapi()
Returns the openapi property from an OpenAPI instance.
|
Paths |
getPaths()
Returns the paths property from an OpenAPI instance.
|
java.util.List<SecurityRequirement> |
getSecurity()
Returns the security property from an OpenAPI instance.
|
java.util.List<Server> |
getServers()
Returns the Servers defined in the API
|
java.util.List<Tag> |
getTags()
Returns the tags property from an OpenAPI instance.
|
default OpenAPI |
info(Info info)
Sets this OpenAPI instance's info property to the given object.
|
default OpenAPI |
openapi(java.lang.String openapi)
Sets this OpenAPI instance's openapi property to the given string.
|
default OpenAPI |
paths(Paths paths)
Sets this OpenAPI instance's paths property to the given paths.
|
void |
removeSecurityRequirement(SecurityRequirement securityRequirement)
Removes the given security requirement to this OpenAPI instance's list of security requirements.
|
void |
removeServer(Server server)
Removes the given server to this OpenAPI instance's list of servers.
|
void |
removeTag(Tag tag)
Removes the given tag to this OpenAPI instance's list of tags.
|
default OpenAPI |
security(java.util.List<SecurityRequirement> security)
Sets this OpenAPI instance's security property to the given list.
|
default OpenAPI |
servers(java.util.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(java.lang.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(java.util.List<SecurityRequirement> security)
Sets this OpenAPI instance's security property to the given list.
|
void |
setServers(java.util.List<Server> servers)
Sets this OpenAPI instance's servers property to the given servers.
|
void |
setTags(java.util.List<Tag> tags)
Sets this OpenAPI instance's tags property to the given Tags.
|
default OpenAPI |
tags(java.util.List<Tag> tags)
Sets this OpenAPI instance's tags property to the given tags.
|
addExtension, extensions, getExtensions, removeExtension, setExtensions
java.lang.String getOpenapi()
void setOpenapi(java.lang.String openapi)
openapi
- the semantic version number of the OpenAPI Specification version that the OpenAPI document usesdefault OpenAPI openapi(java.lang.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 APIdefault OpenAPI info(Info info)
info
- metadata about the APIExternalDocumentation getExternalDocs()
void setExternalDocs(ExternalDocumentation externalDocs)
externalDocs
- additional external documentation.default OpenAPI externalDocs(ExternalDocumentation externalDocs)
externalDocs
- additional external documentationjava.util.List<Server> getServers()
void setServers(java.util.List<Server> servers)
servers
- Server objects which provide connectivity information to target serversdefault OpenAPI servers(java.util.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 servervoid removeServer(Server server)
server
- Server object which provides connectivity information to a target serverjava.util.List<SecurityRequirement> getSecurity()
void setSecurity(java.util.List<SecurityRequirement> security)
security
- which security mechanisms can be used across the APIdefault OpenAPI security(java.util.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 APIvoid removeSecurityRequirement(SecurityRequirement securityRequirement)
securityRequirement
- security mechanism which can be used across the APIjava.util.List<Tag> getTags()
void setTags(java.util.List<Tag> tags)
tags
- tags used by the specification with additional metadatadefault OpenAPI tags(java.util.List<Tag> tags)
tags
- tags used by the specification with additional metadataOpenAPI addTag(Tag tag)
tag
- a tag used by the specification with additional metadatavoid removeTag(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 APIdefault OpenAPI paths(Paths paths)
paths
- the available paths and operations for the APIComponents getComponents()
void setComponents(Components components)
components
- a set of reusable objects used in the API specificationdefault OpenAPI components(Components components)
components
- a set of reusable objects used in the API specification