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.
|
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.
|
OpenAPI |
info(Info info)
Sets this OpenAPI instance's info property to the given object.
|
OpenAPI |
openapi(java.lang.String openapi)
Sets this OpenAPI instance's openapi property to the given string.
|
OpenAPI |
path(java.lang.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(java.util.List<SecurityRequirement> security)
Sets this OpenAPI instance's security property to the given list.
|
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.
|
OpenAPI |
tags(java.util.List<Tag> tags)
Sets this OpenAPI instance's tags property to the given tags.
|
addExtension, getExtensions, 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 usesOpenAPI 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 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 documentationjava.util.List<Server> getServers()
void setServers(java.util.List<Server> servers)
servers
- Server objects which provide connectivity information to target serversOpenAPI 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 serverjava.util.List<SecurityRequirement> getSecurity()
void setSecurity(java.util.List<SecurityRequirement> security)
security
- which security mechanisms can be used across the APIOpenAPI 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 APIjava.util.List<Tag> getTags()
void setTags(java.util.List<Tag> tags)
tags
- tags used by the specification with additional metadataOpenAPI 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 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(java.lang.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 specification