Class ParametersModifyingOperationPreprocessor
java.lang.Object
org.springframework.restdocs.operation.preprocess.OperationPreprocessorAdapter
org.springframework.restdocs.operation.preprocess.ParametersModifyingOperationPreprocessor
- All Implemented Interfaces:
OperationPreprocessor
An
OperationPreprocessor
that can be used to modify a request's
OperationRequest.getParameters()
by adding, setting, and removing parameters.- Since:
- 1.1.0
- Author:
- Andy Wilkinson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a parameter with the givenname
andvalue
.preprocess
(OperationRequest request) Returns the givenrequest
as-is.Removes the parameter with the givenname
.Removes the givenvalue
from the parameter with the givenname
.Sets the parameter with the givenname
to have the givenvalues
.Methods inherited from class org.springframework.restdocs.operation.preprocess.OperationPreprocessorAdapter
preprocess
-
Constructor Details
-
ParametersModifyingOperationPreprocessor
public ParametersModifyingOperationPreprocessor()
-
-
Method Details
-
preprocess
Description copied from class:OperationPreprocessorAdapter
Returns the givenrequest
as-is.- Specified by:
preprocess
in interfaceOperationPreprocessor
- Overrides:
preprocess
in classOperationPreprocessorAdapter
- Parameters:
request
- the request- Returns:
- the unmodified request
-
add
Adds a parameter with the givenname
andvalue
.- Parameters:
name
- the namevalue
- the value- Returns:
this
-
set
Sets the parameter with the givenname
to have the givenvalues
.- Parameters:
name
- the namevalues
- the values- Returns:
this
-
remove
Removes the parameter with the givenname
.- Parameters:
name
- the name of the parameter- Returns:
this
-
remove
Removes the givenvalue
from the parameter with the givenname
.- Parameters:
name
- the namevalue
- the value- Returns:
this
-