public final class Preprocessors
extends java.lang.Object
OperationPreprocessors that can be applied to an Operation's
request or response before it is
documented.| Modifier and Type | Method and Description |
|---|---|
static OperationPreprocessor |
maskLinks()
Returns an
OperationPreprocessor that will mask the href of hypermedia
links in the request or response. |
static OperationPreprocessor |
maskLinks(java.lang.String mask)
Returns an
OperationPreprocessor that will mask the href of hypermedia
links in the request or response. |
static ParametersModifyingOperationPreprocessor |
modifyParameters()
Returns a
ParametersModifyingOperationPreprocessor that can then be
configured to modify the parameters of the request. |
static OperationRequestPreprocessor |
preprocessRequest(OperationPreprocessor... preprocessors)
Returns an
OperationRequestPreprocessor that will preprocess the request by
applying the given preprocessors to it. |
static OperationResponsePreprocessor |
preprocessResponse(OperationPreprocessor... preprocessors)
Returns an
OperationResponsePreprocessor that will preprocess the response
by applying the given preprocessors to it. |
static OperationPreprocessor |
prettyPrint()
Returns an
OperationPreprocessor that will pretty print the content of the
request or response. |
static OperationPreprocessor |
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 |
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 |
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. |
public static OperationRequestPreprocessor preprocessRequest(OperationPreprocessor... preprocessors)
OperationRequestPreprocessor that will preprocess the request by
applying the given preprocessors to it.preprocessors - the preprocessorspublic static OperationResponsePreprocessor preprocessResponse(OperationPreprocessor... preprocessors)
OperationResponsePreprocessor that will preprocess the response
by applying the given preprocessors to it.preprocessors - the preprocessorspublic static OperationPreprocessor prettyPrint()
OperationPreprocessor that will pretty print the content of the
request or response.public static OperationPreprocessor removeHeaders(java.lang.String... headerNames)
OperationPreprocessor that will remove any header from the
request or response with a name that is equal to one of the given
headersToRemove.headerNames - the header namesString.equals(Object)public static OperationPreprocessor removeMatchingHeaders(java.lang.String... headerNamePatterns)
OperationPreprocessor that will remove any headers from the
request or response with a name that matches one of the given
headerNamePatterns regular expressions.headerNamePatterns - the header name patternsMatcher.matches()public static OperationPreprocessor maskLinks()
OperationPreprocessor that will mask the href of hypermedia
links in the request or response.public static OperationPreprocessor maskLinks(java.lang.String mask)
OperationPreprocessor that will mask the href of hypermedia
links in the request or response.mask - the link maskpublic static OperationPreprocessor replacePattern(java.util.regex.Pattern pattern, java.lang.String replacement)
OperationPreprocessor that will modify the content of the
request or response by replacing occurrences of the given pattern with the
given replacement.pattern - the patternreplacement - the replacementpublic static ParametersModifyingOperationPreprocessor modifyParameters()
ParametersModifyingOperationPreprocessor that can then be
configured to modify the parameters of the request.