Package | Description |
---|---|
org.springframework.restdocs.config |
Classes for configuring Spring REST Docs.
|
org.springframework.restdocs.operation.preprocess |
Support for preprocessing an operation prior to it being documented.
|
Modifier and Type | Method and Description |
---|---|
TYPE |
OperationPreprocessorsConfigurer.withRequestDefaults(OperationPreprocessor... preprocessors)
Configures the default operation request preprocessors.
|
TYPE |
OperationPreprocessorsConfigurer.withResponseDefaults(OperationPreprocessor... preprocessors)
Configures the default operation response preprocessors.
|
Modifier and Type | Class and Description |
---|---|
class |
ContentModifyingOperationPreprocessor
An
OperationPreprocessor that applies a ContentModifier to the content
of the request or response. |
class |
OperationPreprocessorAdapter
An implementation of
OperationPreprocessor that returns the request and
response as-is. |
class |
ParametersModifyingOperationPreprocessor
An
OperationPreprocessor that can be used to modify a request's
OperationRequest.getParameters() by adding, setting, and removing parameters. |
class |
UriModifyingOperationPreprocessor
An
OperationPreprocessor that modifies URIs in the request and in the response
by changing one or more of their host, scheme, and port. |
Modifier and Type | Method and Description |
---|---|
static OperationPreprocessor |
Preprocessors.maskLinks()
Returns an
OperationPreprocessor that will mask the href of hypermedia
links in the request or response. |
static OperationPreprocessor |
Preprocessors.maskLinks(java.lang.String mask)
Returns an
OperationPreprocessor that will mask the href of hypermedia
links in the request or response. |
static OperationPreprocessor |
Preprocessors.prettyPrint()
Returns an
OperationPreprocessor that will pretty print the content of the
request or response. |
static OperationPreprocessor |
Preprocessors.removeHeaders(java.lang.String... headerNames)
Returns an
OperationPreprocessor that will remove any header from the
request or response with a name that is equal to one of the given
headersToRemove . |
static OperationPreprocessor |
Preprocessors.removeMatchingHeaders(java.lang.String... headerNamePatterns)
Returns an
OperationPreprocessor that will remove any headers from the
request or response with a name that matches one of the given
headerNamePatterns regular expressions. |
static OperationPreprocessor |
Preprocessors.replacePattern(java.util.regex.Pattern pattern,
java.lang.String replacement)
Returns an
OperationPreprocessor that will modify the content of the
request or response by replacing occurrences of the given pattern with the
given replacement . |
Modifier and Type | Method and Description |
---|---|
static OperationRequestPreprocessor |
Preprocessors.preprocessRequest(OperationPreprocessor... preprocessors)
Returns an
OperationRequestPreprocessor that will preprocess the request by
applying the given preprocessors to it. |
static OperationResponsePreprocessor |
Preprocessors.preprocessResponse(OperationPreprocessor... preprocessors)
Returns an
OperationResponsePreprocessor that will preprocess the response
by applying the given preprocessors to it. |