Interface Components
- All Superinterfaces:
Constructible
,Extensible<Components>
Components
Holds a set of reusable objects for different aspects of the API specification. All objects defined within this object will have no effect on the API unless they are explicitly referenced from properties outside the components object.
All the fields are indexed by keys that must match the regular expression: ^[a-zA-Z0-9\.\-_]+$
.
Key Examples:
- User
- User_1
- User_Name
- user-name
- my.org.User
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddCallback
(String key, Callback callback) Adds the given callback to this Components' map of callbacks with the given string as its key.addExample
(String key, Example example) Adds the given example to this Components' map of examples with the given string as its key.Adds the given header to this Components' map of headers with the given string as its key.Adds the given link to this Components' map of links with the given string as its key.addParameter
(String key, Parameter parameter) Adds the given parameter to this Components' map of parameters with the given string as its key.addRequestBody
(String key, RequestBody requestBody) Adds the given request body to this Components' map of request bodies with the given string as its key.addResponse
(String key, APIResponse response) Adds the given response to this Components' map of responses with the given string as its key.Adds the given schema to this Components' list of schemas with the given string as its key.addSecurityScheme
(String key, SecurityScheme securityScheme) Adds the given security scheme to this Components' map of security schemes with the given string as its key.default Components
Sets this Components' callbacks property to the given Map containing keys and reusable callback objects.default Components
Sets this Components' examples property to the given Map containing keys and reusable example objects.Returns the callbacks property from a Components instance.Returns the examples property from a Components instance.Returns the headers property from a Components instance.getLinks()
Returns the links property from a Components instance.Returns the parameters property from a Components instance.Returns the requestBodies property from a Components instance.Returns the responses property from a Components instance.Returns the schemas property from a Components instance.Returns the securitySchemes property from a Components instance.default Components
Sets this Components' headers property to the given Map containing keys and reusable header objects.default Components
Sets this Components' links property to the given Map containing keys and reusable link objects.default Components
parameters
(Map<String, Parameter> parameters) Sets this Components' parameters property to the given Map containing keys and reusable parameter objects.void
removeCallback
(String key) Removes the given callback to this Components' map of callbacks with the given string as its key.void
removeExample
(String key) Removes the given example to this Components' map of examples with the given string as its key.void
removeHeader
(String key) Removes the given header to this Components' map of headers with the given string as its key.void
removeLink
(String key) Removes the given link to this Components' map of links with the given string as its key.void
removeParameter
(String key) Removes the given parameter to this Components' map of parameters with the given string as its key.void
removeRequestBody
(String key) Removes the given request body to this Components' map of request bodies with the given string as its key.void
removeResponse
(String key) Removes the given response to this Components' map of responses with the given string as its key.void
removeSchema
(String key) Removes the given schema to this Components' list of schemas with the given string as its key.void
Removes the given security scheme to this Components' map of security schemes with the given string as its key.default Components
requestBodies
(Map<String, RequestBody> requestBodies) Sets this Components' requestBodies property to the given Map containing keys and reusable request body objects.default Components
responses
(Map<String, APIResponse> responses) Sets this Components' responses property to the given Map containing keys and reusable response objects.default Components
Sets this Components' schemas property to the given Map containing keys and reusable schemas.default Components
securitySchemes
(Map<String, SecurityScheme> securitySchemes) Sets this Components' securitySchemes property to the given Map containing keys and reusable security scheme objects.void
setCallbacks
(Map<String, Callback> callbacks) Sets this Components' callbacks property to the given Map containing keys and reusable callback objects.void
setExamples
(Map<String, Example> examples) Sets this Components' examples property to the given Map containing keys and reusable example objects.void
setHeaders
(Map<String, Header> headers) Sets this Components' headers property to the given Map containing keys and reusable header objects.void
Sets this Components' links property to the given Map containing keys and reusable link objects.void
setParameters
(Map<String, Parameter> parameters) Sets this Components' parameters property to the given Map containing keys and reusable parameter objects.void
setRequestBodies
(Map<String, RequestBody> requestBodies) Sets this Components' requestBodies property to the given Map containing keys and reusable request body objects.void
setResponses
(Map<String, APIResponse> responses) Sets this Components' responses property to the given Map containing keys and reusable response objects.void
setSchemas
(Map<String, Schema> schemas) Sets this Components' schemas property to the given Map containing keys and reusable schema objects.void
setSecuritySchemes
(Map<String, SecurityScheme> securitySchemes) Sets this Components' securitySchemes property to the given Map containing keys and reusable security scheme objects.Methods inherited from interface org.eclipse.microprofile.openapi.models.Extensible
addExtension, extensions, getExtensions, removeExtension, setExtensions
-
Method Details
-
getSchemas
Returns the schemas property from a Components instance.- Returns:
- a copy Map (potentially immutable) containing the keys and the reusable schemas for this OpenAPI document
-
setSchemas
Sets this Components' schemas property to the given Map containing keys and reusable schema objects.- Parameters:
schemas
- a Map containing keys and reusable schema objects
-
schemas
Sets this Components' schemas property to the given Map containing keys and reusable schemas.- Parameters:
schemas
- a Map containing keys and reusable schemas- Returns:
- the current Components object
-
addSchema
Adds the given schema to this Components' list of schemas with the given string as its key.- Parameters:
key
- a key conforming to the format required for this objectschema
- a reusable schema object. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- the current Components object
-
removeSchema
Removes the given schema to this Components' list of schemas with the given string as its key.- Parameters:
key
- a key conforming to the format required for this object
-
getResponses
Map<String,APIResponse> getResponses()Returns the responses property from a Components instance.- Returns:
- a copy Map (potentially immutable) containing the keys and the reusable responses from API operations for this OpenAPI document
-
setResponses
Sets this Components' responses property to the given Map containing keys and reusable response objects.- Parameters:
responses
- a Map containing keys and reusable response objects
-
responses
Sets this Components' responses property to the given Map containing keys and reusable response objects.- Parameters:
responses
- a Map containing keys and reusable response objects- Returns:
- the current Components object
-
addResponse
Adds the given response to this Components' map of responses with the given string as its key.- Parameters:
key
- a key conforming to the format required for this objectresponse
- a reusable response object. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- the current Components object
-
removeResponse
Removes the given response to this Components' map of responses with the given string as its key.- Parameters:
key
- a key conforming to the format required for this object
-
getParameters
Returns the parameters property from a Components instance.- Returns:
- a copy Map (potentially immutable) containing the keys and the reusable parameters of API operations for this OpenAPI document
-
setParameters
Sets this Components' parameters property to the given Map containing keys and reusable parameter objects.- Parameters:
parameters
- a Map containing keys and reusable parameter objects
-
parameters
Sets this Components' parameters property to the given Map containing keys and reusable parameter objects.- Parameters:
parameters
- a Map containing keys and reusable parameter objects- Returns:
- the current Components object
-
addParameter
Adds the given parameter to this Components' map of parameters with the given string as its key.- Parameters:
key
- a key conforming to the format required for this objectparameter
- a reusable parameter object. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- the current Components object
-
removeParameter
Removes the given parameter to this Components' map of parameters with the given string as its key.- Parameters:
key
- a key conforming to the format required for this object
-
getExamples
Returns the examples property from a Components instance.- Returns:
- a copy Map (potentially immutable) containing the keys and the reusable examples for this OpenAPI document
-
setExamples
Sets this Components' examples property to the given Map containing keys and reusable example objects.- Parameters:
examples
- a Map containing keys and reusable example objects
-
examples
Sets this Components' examples property to the given Map containing keys and reusable example objects.- Parameters:
examples
- a Map containing keys and reusable example objects- Returns:
- the current Components object
-
addExample
Adds the given example to this Components' map of examples with the given string as its key.- Parameters:
key
- a key conforming to the format required for this objectexample
- a reusable example object. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- the current Components object
-
removeExample
Removes the given example to this Components' map of examples with the given string as its key.- Parameters:
key
- a key conforming to the format required for this object
-
getRequestBodies
Map<String,RequestBody> getRequestBodies()Returns the requestBodies property from a Components instance.- Returns:
- a copy Map (potentially immutable) containing the keys and the reusable request bodies for this OpenAPI document
-
setRequestBodies
Sets this Components' requestBodies property to the given Map containing keys and reusable request body objects.- Parameters:
requestBodies
- a Map containing the keys and reusable request body objects
-
requestBodies
Sets this Components' requestBodies property to the given Map containing keys and reusable request body objects.- Parameters:
requestBodies
- a Map containing the keys and reusable request body objects- Returns:
- the current Components object
-
addRequestBody
Adds the given request body to this Components' map of request bodies with the given string as its key.- Parameters:
key
- a key conforming to the format required for this objectrequestBody
- a reusable request body object. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- the current Components object
-
removeRequestBody
Removes the given request body to this Components' map of request bodies with the given string as its key.- Parameters:
key
- a key conforming to the format required for this object
-
getHeaders
Returns the headers property from a Components instance.- Returns:
- a copy Map (potentially immutable) containing the keys and the reusable headers for this OpenAPI document
-
setHeaders
Sets this Components' headers property to the given Map containing keys and reusable header objects.- Parameters:
headers
- a Map containing the keys and reusable header objects
-
headers
Sets this Components' headers property to the given Map containing keys and reusable header objects.- Parameters:
headers
- a Map containing the keys and reusable header objects- Returns:
- the current Components object
-
addHeader
Adds the given header to this Components' map of headers with the given string as its key.- Parameters:
key
- a key conforming to the format required for this objectheader
- a reusable header object. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- the current Components object
-
removeHeader
Removes the given header to this Components' map of headers with the given string as its key.- Parameters:
key
- a key conforming to the format required for this object
-
getSecuritySchemes
Map<String,SecurityScheme> getSecuritySchemes()Returns the securitySchemes property from a Components instance.- Returns:
- a copy Map (potentially immutable) containing the keys and the reusable security schemes for this OpenAPI document
-
setSecuritySchemes
Sets this Components' securitySchemes property to the given Map containing keys and reusable security scheme objects.- Parameters:
securitySchemes
- a Map containing the keys and reusable security scheme objects
-
securitySchemes
Sets this Components' securitySchemes property to the given Map containing keys and reusable security scheme objects.- Parameters:
securitySchemes
- a Map containing the keys and reusable security scheme objects- Returns:
- the current Components object
-
addSecurityScheme
Adds the given security scheme to this Components' map of security schemes with the given string as its key.- Parameters:
key
- a key conforming to the format required for this objectsecurityScheme
- a reusable security scheme object. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- the current Components object
-
removeSecurityScheme
Removes the given security scheme to this Components' map of security schemes with the given string as its key.- Parameters:
key
- a key conforming to the format required for this object
-
getLinks
Returns the links property from a Components instance.- Returns:
- a copy Map (potentially immutable) containing the keys and the reusable links for this OpenAPI document
-
setLinks
Sets this Components' links property to the given Map containing keys and reusable link objects.- Parameters:
links
- a Map containing the keys and reusable link objects
-
links
Sets this Components' links property to the given Map containing keys and reusable link objects.- Parameters:
links
- a Map containing the keys and reusable link objects- Returns:
- the current Components object
-
addLink
Adds the given link to this Components' map of links with the given string as its key.- Parameters:
key
- a key conforming to the format required for this objectlink
- a reusable link object. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- the current Components object
-
removeLink
Removes the given link to this Components' map of links with the given string as its key.- Parameters:
key
- a key conforming to the format required for this object
-
getCallbacks
Returns the callbacks property from a Components instance.- Returns:
- a copy Map (potentially immutable) containing the keys and the reusable callbacks for this OpenAPI document
-
setCallbacks
Sets this Components' callbacks property to the given Map containing keys and reusable callback objects.- Parameters:
callbacks
- a Map containing the keys and reusable callback objects
-
callbacks
Sets this Components' callbacks property to the given Map containing keys and reusable callback objects.- Parameters:
callbacks
- a Map containing the keys and reusable callback objects- Returns:
- the current Components object
-
addCallback
Adds the given callback to this Components' map of callbacks with the given string as its key.- Parameters:
key
- a key conforming to the format required for this objectcallback
- a reusable callback object. null values will be rejected (implementation will throw an exception) or ignored.- Returns:
- the current Components object
-
removeCallback
Removes the given callback to this Components' map of callbacks with the given string as its key.- Parameters:
key
- a key conforming to the format required for this object
-