Interface OpenAPI
- All Superinterfaces:
Constructible
,Extensible
OpenAPI
This is the root document object of the OpenAPI document. It contains required and optional fields.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddSecurityRequirement
(SecurityRequirement securityRequirement) Adds the given security requirement to this OpenAPI instance's list of security requirements.Adds the given server to this OpenAPI instance's list of servers.Adds the given tag to this OpenAPI instance's list of tags.components
(Components components) Sets this OpenAPI instance's components property to the given components.externalDocs
(ExternalDocumentation externalDocs) Sets this OpenAPI instance's externalDocs property to the given object.Returns the components property from an OpenAPI instance.Returns the externalDocs property from an OpenAPI instance.getInfo()
Returns the info property from an OpenAPI instance.Returns the openapi property from an OpenAPI instance.getPaths()
Returns the paths property from an OpenAPI instance.Returns the security property from an OpenAPI instance.Returns the Servers defined in the APIgetTags()
Returns the tags property from an OpenAPI instance.Sets this OpenAPI instance's info property to the given object.Sets this OpenAPI instance's openapi property to the given string.Adds the given path item to this OpenAPI instance's list of pathsSets this OpenAPI instance's paths property to the given paths.security
(List<SecurityRequirement> security) Sets this OpenAPI instance's security property to the given list.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
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
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
Sets this OpenAPI instance's tags property to the given Tags.Sets this OpenAPI instance's tags property to the given tags.Methods inherited from interface org.eclipse.microprofile.openapi.models.Extensible
addExtension, getExtensions, setExtensions
-
Method Details
-
getOpenapi
String getOpenapi()Returns the openapi property from an OpenAPI instance.- Returns:
- the semantic version number of the OpenAPI Specification version that the OpenAPI document uses
-
setOpenapi
Sets this OpenAPI instance's openapi property to the given string.- Parameters:
openapi
- the semantic version number of the OpenAPI Specification version that the OpenAPI document uses
-
openapi
Sets this OpenAPI instance's openapi property to the given string.- Parameters:
openapi
- the semantic version number of the OpenAPI Specification version that the OpenAPI document uses- Returns:
- the current OpenAPI object
-
getInfo
Info getInfo()Returns the info property from an OpenAPI instance.- Returns:
- metadata about the API
-
setInfo
Sets this OpenAPI instance's info property to the given object.- Parameters:
info
- metadata about the API
-
info
Sets this OpenAPI instance's info property to the given object.- Parameters:
info
- metadata about the API- Returns:
- the current OpenAPI object
-
getExternalDocs
ExternalDocumentation getExternalDocs()Returns the externalDocs property from an OpenAPI instance.- Returns:
- additional external documentation
-
setExternalDocs
Sets this OpenAPI instance's externalDocs property to the given object.- Parameters:
externalDocs
- additional external documentation.
-
externalDocs
Sets this OpenAPI instance's externalDocs property to the given object.- Parameters:
externalDocs
- additional external documentation- Returns:
- the current OpenAPI object
-
getServers
Returns the Servers defined in the API- Returns:
- Server objects which provide connectivity information to target servers
-
setServers
Sets this OpenAPI instance's servers property to the given servers.- Parameters:
servers
- Server objects which provide connectivity information to target servers
-
servers
Sets this OpenAPI instance's servers property to the given servers.- Parameters:
servers
- Server objects which provide connectivity information to target servers- Returns:
- the current OpenAPI object
-
addServer
Adds the given server to this OpenAPI instance's list of servers.- Parameters:
server
- Server object which provides connectivity information to a target server- Returns:
- the current OpenAPI object
-
getSecurity
List<SecurityRequirement> getSecurity()Returns the security property from an OpenAPI instance.- Returns:
- which security mechanisms can be used across the API
-
setSecurity
Sets this OpenAPI instance's security property to the given list.- Parameters:
security
- which security mechanisms can be used across the API
-
security
Sets this OpenAPI instance's security property to the given list.- Parameters:
security
- which security mechanisms can be used across the API- Returns:
- the current OpenAPI object
-
addSecurityRequirement
Adds the given security requirement to this OpenAPI instance's list of security requirements.- Parameters:
securityRequirement
- security mechanism which can be used across the API- Returns:
- the current OpenAPI object
-
getTags
Returns the tags property from an OpenAPI instance.- Returns:
- tags used by the specification
-
setTags
Sets this OpenAPI instance's tags property to the given Tags.- Parameters:
tags
- tags used by the specification with additional metadata
-
tags
Sets this OpenAPI instance's tags property to the given tags.- Parameters:
tags
- tags used by the specification with additional metadata- Returns:
- the current OpenAPI object
-
addTag
Adds the given tag to this OpenAPI instance's list of tags.- Parameters:
tag
- a tag used by the specification with additional metadata- Returns:
- the current OpenAPI object
-
getPaths
Paths getPaths()Returns the paths property from an OpenAPI instance.- Returns:
- the available paths and operations for the API
-
setPaths
Sets this OpenAPI instance's paths property to the given paths.- Parameters:
paths
- the available paths and operations for the API
-
paths
Sets this OpenAPI instance's paths property to the given paths.- Parameters:
paths
- the available paths and operations for the API- Returns:
- the current OpenAPI object
-
path
Adds the given path item to this OpenAPI instance's list of paths- Parameters:
name
- a path name in the format valid for a Paths objectpath
- the path item added to the list of paths- Returns:
- the current OpenAPI object
-
getComponents
Components getComponents()Returns the components property from an OpenAPI instance.- Returns:
- schemas used in the specification
-
setComponents
Sets this OpenAPI instance's components property to the given components.- Parameters:
components
- a set of reusable objects used in the API specification
-
components
Sets this OpenAPI instance's components property to the given components.- Parameters:
components
- a set of reusable objects used in the API specification- Returns:
- the current OpenAPI object
-