| Modifier and Type | Method and Description |
|---|---|
| public APIResponses | Returns: APIResponses map with the added ApiResponse instancethe name of APIResponse (http status code eventually with wildcard or default) name, APIResponse the APIResponse object to be added to APIResponses map. null values will be rejected (implementation
will throw an exception) or ignored. apiResponse)Adds an APIResponse in the format of the name as a key and the item as the value to APIResponses map |
| public default APIResponses | Returns: this ApiResponses instancethe default documentation of responses defaultValue)Sets the default documentation of responses for this instance of ApiResponses and return this instance of ApiResponses. |
| public default APIResponse | Returns: the corresponding APIResponse or null.the name of APIResponse (http status code eventually with wildcard or default) name)Returns a APIResponse for a given name. |
| public Map | Returns: all responsesReturns a copy map (potentially immutable) of the APIResponses. |
| public APIResponse | Returns: the default documentation of responsesReturns the default documentation of responses other than the ones declared for specific HTTP response codes in this instance of ApiResponses. |
| public default boolean | Returns: a boolean to indicate if the APIResponse is present or not.the name of APIResponse (http status code eventually with wildcard or default) name)Check whether a APIResponse is present in the map. |
| public void | removeAPIResponse(String
the name of APIResponse that will be removed (http status code eventually with wildcard or
default) name)Removes the given APIResponse to this APIResponses. |
| public void | setAPIResponses(Map<String, APIResponse>
a map containing all responses. Keys are http statuses code eventually with wildcard or
default. items)Set the APIResponses map to this APIResponses |
| public void | setDefaultValue(APIResponse
the default documentation of responses defaultValue)Sets the default documentation of responses for this instance of ApiResponses. |
| DEFAULT | back to summary |
|---|---|
| public static final String DEFAULT | |
| addAPIResponse | back to summary |
|---|---|
| public APIResponses addAPIResponse(String name, APIResponse apiResponse) Adds an APIResponse in the format of the name as a key and the item as the value to APIResponses map
| |
| defaultValue | back to summary |
|---|---|
| public default APIResponses defaultValue(APIResponse defaultValue) Sets the default documentation of responses for this instance of ApiResponses and return this instance of ApiResponses. This will cover all the undeclared responses.
Convenience method that is the same as calling
| |
| getAPIResponse | back to summary |
|---|---|
| public default APIResponse getAPIResponse(String name) Returns a APIResponse for a given name. This is a convenience method for
| |
| getAPIResponses | back to summary |
|---|---|
| public Map Returns a copy map (potentially immutable) of the APIResponses.
| |
| getDefaultValue | back to summary |
|---|---|
| public APIResponse getDefaultValue() Returns the default documentation of responses other than the ones declared for specific HTTP response codes in this instance of ApiResponses.
Convenience method that is the same as calling
| |
| hasAPIResponse | back to summary |
|---|---|
| public default boolean hasAPIResponse(String name) Check whether a APIResponse is present in the map. This is a convenience method for
| |
| removeAPIResponse | back to summary |
|---|---|
| public void removeAPIResponse(String name) Removes the given APIResponse to this APIResponses.
| |
| setAPIResponses | back to summary |
|---|---|
| public void setAPIResponses(Map<String, APIResponse> items) Set the APIResponses map to this APIResponses
| |
| setDefaultValue | back to summary |
|---|---|
| public void setDefaultValue(APIResponse defaultValue) Sets the default documentation of responses for this instance of ApiResponses. This will cover all the undeclared responses.
Convenience method that is the same as calling
| |