public abstract class WebTestClientRestDocumentation extends Object
WebTestClient
.Modifier and Type | Method and Description |
---|---|
static <T extends ExchangeResult> |
document(String identifier,
OperationRequestPreprocessor requestPreprocessor,
OperationResponsePreprocessor responsePreprocessor,
Snippet... snippets)
Documents the API call with the given
identifier using the given
snippets in addition to any default snippets. |
static <T extends ExchangeResult> |
document(String identifier,
OperationRequestPreprocessor requestPreprocessor,
Snippet... snippets)
Documents the API call with the given
identifier using the given
snippets in addition to any default snippets. |
static <T extends ExchangeResult> |
document(String identifier,
OperationResponsePreprocessor responsePreprocessor,
Snippet... snippets)
Documents the API call with the given
identifier using the given
snippets in addition to any default snippets. |
static <T extends ExchangeResult> |
document(String identifier,
Snippet... snippets)
Returns a
Consumer that, when called, documents the API call with the given
identifier using the given snippets in addition to any default
snippets. |
static WebTestClientRestDocumentationConfigurer |
documentationConfiguration(RestDocumentationContextProvider contextProvider)
Provides access to a
ExchangeFilterFunction that can be used to configure a
WebTestClient instance using the given contextProvider . |
public static WebTestClientRestDocumentationConfigurer documentationConfiguration(RestDocumentationContextProvider contextProvider)
ExchangeFilterFunction
that can be used to configure a
WebTestClient
instance using the given contextProvider
.contextProvider
- the context providerWebTestClient.Builder.filter(ExchangeFilterFunction)
public static <T extends ExchangeResult> Consumer<T> document(String identifier, Snippet... snippets)
Consumer
that, when called, documents the API call with the given
identifier
using the given snippets
in addition to any default
snippets.T
- the type of ExchangeResult
that will be consumedidentifier
- an identifier for the API call that is being documentedsnippets
- the snippetsConsumer
that will document the API call represented by the
ExchangeResult
.WebTestClient.BodySpec.consumeWith(Consumer)
,
WebTestClient.BodyContentSpec.consumeWith(Consumer)
public static <T extends ExchangeResult> Consumer<T> document(String identifier, OperationRequestPreprocessor requestPreprocessor, Snippet... snippets)
identifier
using the given
snippets
in addition to any default snippets. The given
requestPreprocessor
is applied to the request before it is documented.T
- the type of ExchangeResult
that will be consumedidentifier
- an identifier for the API call that is being documentedrequestPreprocessor
- the request preprocessorsnippets
- the snippetsConsumer
that will document the API call represented by the
ExchangeResult
.public static <T extends ExchangeResult> Consumer<T> document(String identifier, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets)
identifier
using the given
snippets
in addition to any default snippets. The given
responsePreprocessor
is applied to the request before it is documented.T
- the type of ExchangeResult
that will be consumedidentifier
- an identifier for the API call that is being documentedresponsePreprocessor
- the response preprocessorsnippets
- the snippetsConsumer
that will document the API call represented by the
ExchangeResult
.public static <T extends ExchangeResult> Consumer<T> document(String identifier, OperationRequestPreprocessor requestPreprocessor, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets)
identifier
using the given
snippets
in addition to any default snippets. The given
requestPreprocessor
and responsePreprocessor
are applied to the
request and response respectively before they are documented.T
- the type of ExchangeResult
that will be consumedidentifier
- an identifier for the API call that is being documentedrequestPreprocessor
- the request preprocessorresponsePreprocessor
- the response preprocessorsnippets
- the snippetsConsumer
that will document the API call represented by the
ExchangeResult
.