public class Preprocessors extends 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(String mask)
Returns an
OperationPreprocessor that will mask the href of hypermedia
links in the request or response. |
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(String... headersToRemove)
Returns an
OperationPreprocessor that will remove headers from the request
or response. |
static OperationPreprocessor |
replacePattern(Pattern pattern,
String replacement)
Returns an
OperationPreprocessor that will modify the content of the
request or response by replacing occurences 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(String... headersToRemove)
OperationPreprocessor
that will remove headers from the request
or response.headersToRemove
- the names of the headers to removepublic static OperationPreprocessor maskLinks()
OperationPreprocessor
that will mask the href of hypermedia
links in the request or response.public static OperationPreprocessor maskLinks(String mask)
OperationPreprocessor
that will mask the href of hypermedia
links in the request or response.mask
- the link maskpublic static OperationPreprocessor replacePattern(Pattern pattern, String replacement)
OperationPreprocessor
that will modify the content of the
request or response by replacing occurences of the given pattern
with the
given replacement
pattern
- the patternreplacement
- the replacement