public interface Components extends Constructible, Extensible<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:
Modifier and Type | Method and Description |
---|---|
Components |
addCallback(java.lang.String key,
Callback callback)
Adds the given callback to this Components' map of callbacks with the given string as its key.
|
Components |
addExample(java.lang.String key,
Example example)
Adds the given example to this Components' map of examples with the given string as its key.
|
Components |
addHeader(java.lang.String key,
Header header)
Adds the given header to this Components' map of headers with the given string as its key.
|
Components |
addLink(java.lang.String key,
Link link)
Adds the given link to this Components' map of links with the given string as its key.
|
Components |
addParameter(java.lang.String key,
Parameter parameter)
Adds the given parameter to this Components' map of parameters with the given string as its key.
|
Components |
addRequestBody(java.lang.String key,
RequestBody requestBody)
Adds the given request body to this Components' map of request bodies with the given string as its key.
|
Components |
addResponse(java.lang.String key,
APIResponse response)
Adds the given response to this Components' map of responses with the given string as its key.
|
Components |
addSchema(java.lang.String key,
Schema schema)
Adds the given schema to this Components' list of schemas with the given string as its key.
|
Components |
addSecurityScheme(java.lang.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 |
callbacks(java.util.Map<java.lang.String,Callback> callbacks)
Sets this Components' callbacks property to the given Map containing keys and reusable callback objects.
|
default Components |
examples(java.util.Map<java.lang.String,Example> examples)
Sets this Components' examples property to the given Map containing keys and reusable example objects.
|
java.util.Map<java.lang.String,Callback> |
getCallbacks()
Returns the callbacks property from a Components instance.
|
java.util.Map<java.lang.String,Example> |
getExamples()
Returns the examples property from a Components instance.
|
java.util.Map<java.lang.String,Header> |
getHeaders()
Returns the headers property from a Components instance.
|
java.util.Map<java.lang.String,Link> |
getLinks()
Returns the links property from a Components instance.
|
java.util.Map<java.lang.String,Parameter> |
getParameters()
Returns the parameters property from a Components instance.
|
java.util.Map<java.lang.String,RequestBody> |
getRequestBodies()
Returns the requestBodies property from a Components instance.
|
java.util.Map<java.lang.String,APIResponse> |
getResponses()
Returns the responses property from a Components instance.
|
java.util.Map<java.lang.String,Schema> |
getSchemas()
Returns the schemas property from a Components instance.
|
java.util.Map<java.lang.String,SecurityScheme> |
getSecuritySchemes()
Returns the securitySchemes property from a Components instance.
|
default Components |
headers(java.util.Map<java.lang.String,Header> headers)
Sets this Components' headers property to the given Map containing keys and reusable header objects.
|
default Components |
links(java.util.Map<java.lang.String,Link> links)
Sets this Components' links property to the given Map containing keys and reusable link objects.
|
default Components |
parameters(java.util.Map<java.lang.String,Parameter> parameters)
Sets this Components' parameters property to the given Map containing keys and reusable parameter objects.
|
void |
removeCallback(java.lang.String key)
Removes the given callback to this Components' map of callbacks with the given string as its key.
|
void |
removeExample(java.lang.String key)
Removes the given example to this Components' map of examples with the given string as its key.
|
void |
removeHeader(java.lang.String key)
Removes the given header to this Components' map of headers with the given string as its key.
|
void |
removeLink(java.lang.String key)
Removes the given link to this Components' map of links with the given string as its key.
|
void |
removeParameter(java.lang.String key)
Removes the given parameter to this Components' map of parameters with the given string as its key.
|
void |
removeRequestBody(java.lang.String key)
Removes the given request body to this Components' map of request bodies with the given string as its key.
|
void |
removeResponse(java.lang.String key)
Removes the given response to this Components' map of responses with the given string as its key.
|
void |
removeSchema(java.lang.String key)
Removes the given schema to this Components' list of schemas with the given string as its key.
|
void |
removeSecurityScheme(java.lang.String key)
Removes the given security scheme to this Components' map of security schemes with the given string as its key.
|
default Components |
requestBodies(java.util.Map<java.lang.String,RequestBody> requestBodies)
Sets this Components' requestBodies property to the given Map containing keys and reusable request body objects.
|
default Components |
responses(java.util.Map<java.lang.String,APIResponse> responses)
Sets this Components' responses property to the given Map containing keys and reusable response objects.
|
default Components |
schemas(java.util.Map<java.lang.String,Schema> schemas)
Sets this Components' schemas property to the given Map containing keys and reusable schemas.
|
default Components |
securitySchemes(java.util.Map<java.lang.String,SecurityScheme> securitySchemes)
Sets this Components' securitySchemes property to the given Map containing keys and reusable security scheme
objects.
|
void |
setCallbacks(java.util.Map<java.lang.String,Callback> callbacks)
Sets this Components' callbacks property to the given Map containing keys and reusable callback objects.
|
void |
setExamples(java.util.Map<java.lang.String,Example> examples)
Sets this Components' examples property to the given Map containing keys and reusable example objects.
|
void |
setHeaders(java.util.Map<java.lang.String,Header> headers)
Sets this Components' headers property to the given Map containing keys and reusable header objects.
|
void |
setLinks(java.util.Map<java.lang.String,Link> links)
Sets this Components' links property to the given Map containing keys and reusable link objects.
|
void |
setParameters(java.util.Map<java.lang.String,Parameter> parameters)
Sets this Components' parameters property to the given Map containing keys and reusable parameter objects.
|
void |
setRequestBodies(java.util.Map<java.lang.String,RequestBody> requestBodies)
Sets this Components' requestBodies property to the given Map containing keys and reusable request body objects.
|
void |
setResponses(java.util.Map<java.lang.String,APIResponse> responses)
Sets this Components' responses property to the given Map containing keys and reusable response objects.
|
void |
setSchemas(java.util.Map<java.lang.String,Schema> schemas)
Sets this Components' schemas property to the given Map containing keys and reusable schema objects.
|
void |
setSecuritySchemes(java.util.Map<java.lang.String,SecurityScheme> securitySchemes)
Sets this Components' securitySchemes property to the given Map containing keys and reusable security scheme
objects.
|
addExtension, extensions, getExtensions, removeExtension, setExtensions
java.util.Map<java.lang.String,Schema> getSchemas()
void setSchemas(java.util.Map<java.lang.String,Schema> schemas)
schemas
- a Map containing keys and reusable schema objectsdefault Components schemas(java.util.Map<java.lang.String,Schema> schemas)
schemas
- a Map containing keys and reusable schemasComponents addSchema(java.lang.String key, Schema schema)
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.void removeSchema(java.lang.String key)
key
- a key conforming to the format required for this objectjava.util.Map<java.lang.String,APIResponse> getResponses()
void setResponses(java.util.Map<java.lang.String,APIResponse> responses)
responses
- a Map containing keys and reusable response objectsdefault Components responses(java.util.Map<java.lang.String,APIResponse> responses)
responses
- a Map containing keys and reusable response objectsComponents addResponse(java.lang.String key, APIResponse response)
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.void removeResponse(java.lang.String key)
key
- a key conforming to the format required for this objectjava.util.Map<java.lang.String,Parameter> getParameters()
void setParameters(java.util.Map<java.lang.String,Parameter> parameters)
parameters
- a Map containing keys and reusable parameter objectsdefault Components parameters(java.util.Map<java.lang.String,Parameter> parameters)
parameters
- a Map containing keys and reusable parameter objectsComponents addParameter(java.lang.String key, Parameter parameter)
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.void removeParameter(java.lang.String key)
key
- a key conforming to the format required for this objectjava.util.Map<java.lang.String,Example> getExamples()
void setExamples(java.util.Map<java.lang.String,Example> examples)
examples
- a Map containing keys and reusable example objectsdefault Components examples(java.util.Map<java.lang.String,Example> examples)
examples
- a Map containing keys and reusable example objectsComponents addExample(java.lang.String key, Example example)
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.void removeExample(java.lang.String key)
key
- a key conforming to the format required for this objectjava.util.Map<java.lang.String,RequestBody> getRequestBodies()
void setRequestBodies(java.util.Map<java.lang.String,RequestBody> requestBodies)
requestBodies
- a Map containing the keys and reusable request body objectsdefault Components requestBodies(java.util.Map<java.lang.String,RequestBody> requestBodies)
requestBodies
- a Map containing the keys and reusable request body objectsComponents addRequestBody(java.lang.String key, RequestBody requestBody)
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.void removeRequestBody(java.lang.String key)
key
- a key conforming to the format required for this objectjava.util.Map<java.lang.String,Header> getHeaders()
void setHeaders(java.util.Map<java.lang.String,Header> headers)
headers
- a Map containing the keys and reusable header objectsdefault Components headers(java.util.Map<java.lang.String,Header> headers)
headers
- a Map containing the keys and reusable header objectsComponents addHeader(java.lang.String key, Header header)
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.void removeHeader(java.lang.String key)
key
- a key conforming to the format required for this objectjava.util.Map<java.lang.String,SecurityScheme> getSecuritySchemes()
void setSecuritySchemes(java.util.Map<java.lang.String,SecurityScheme> securitySchemes)
securitySchemes
- a Map containing the keys and reusable security scheme objectsdefault Components securitySchemes(java.util.Map<java.lang.String,SecurityScheme> securitySchemes)
securitySchemes
- a Map containing the keys and reusable security scheme objectsComponents addSecurityScheme(java.lang.String key, SecurityScheme securityScheme)
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.void removeSecurityScheme(java.lang.String key)
key
- a key conforming to the format required for this objectjava.util.Map<java.lang.String,Link> getLinks()
void setLinks(java.util.Map<java.lang.String,Link> links)
links
- a Map containing the keys and reusable link objectsdefault Components links(java.util.Map<java.lang.String,Link> links)
links
- a Map containing the keys and reusable link objectsComponents addLink(java.lang.String key, Link link)
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.void removeLink(java.lang.String key)
key
- a key conforming to the format required for this objectjava.util.Map<java.lang.String,Callback> getCallbacks()
void setCallbacks(java.util.Map<java.lang.String,Callback> callbacks)
callbacks
- a Map containing the keys and reusable callback objectsdefault Components callbacks(java.util.Map<java.lang.String,Callback> callbacks)
callbacks
- a Map containing the keys and reusable callback objectsComponents addCallback(java.lang.String key, Callback callback)
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.void removeCallback(java.lang.String key)
key
- a key conforming to the format required for this object