public abstract class MockMvcRestDocumentation extends Object
Modifier and Type | Method and Description |
---|---|
static RestDocumentationResultHandler |
document(String identifier,
OperationRequestPreprocessor requestPreprocessor,
OperationResponsePreprocessor responsePreprocessor,
Snippet... snippets)
Documents the API call with the given
identifier using the given
snippets . |
static RestDocumentationResultHandler |
document(String identifier,
OperationRequestPreprocessor requestPreprocessor,
Snippet... snippets)
Documents the API call with the given
identifier using the given
snippets . |
static RestDocumentationResultHandler |
document(String identifier,
OperationResponsePreprocessor responsePreprocessor,
Snippet... snippets)
Documents the API call with the given
identifier using the given
snippets . |
static RestDocumentationResultHandler |
document(String identifier,
Snippet... snippets)
Documents the API call with the given
identifier using the given
snippets . |
static RestDocumentationMockMvcConfigurer |
documentationConfiguration(RestDocumentation restDocumentation)
Provides access to a
MockMvcConfigurer that can be used to configure a
MockMvc instance using the given restDocumentation . |
public static RestDocumentationMockMvcConfigurer documentationConfiguration(RestDocumentation restDocumentation)
MockMvcConfigurer
that can be used to configure a
MockMvc
instance using the given restDocumentation
.restDocumentation
- the REST documentationConfigurableMockMvcBuilder.apply(MockMvcConfigurer)
public static RestDocumentationResultHandler document(String identifier, Snippet... snippets)
identifier
using the given
snippets
.identifier
- an identifier for the API call that is being documentedsnippets
- the snippets that will document the API callResultHandler
that will produce the documentationMockMvc.perform(org.springframework.test.web.servlet.RequestBuilder)
,
ResultActions.andDo(org.springframework.test.web.servlet.ResultHandler)
public static RestDocumentationResultHandler document(String identifier, OperationRequestPreprocessor requestPreprocessor, Snippet... snippets)
identifier
using the given
snippets
. The given requestPreprocessor
is applied to the request
before it is documented.identifier
- an identifier for the API call that is being documentedrequestPreprocessor
- the request preprocessorsnippets
- the snippets that will document the API callResultHandler
that will produce the documentationMockMvc.perform(org.springframework.test.web.servlet.RequestBuilder)
,
ResultActions.andDo(org.springframework.test.web.servlet.ResultHandler)
public static RestDocumentationResultHandler document(String identifier, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets)
identifier
using the given
snippets
. The given responsePreprocessor
is applied to the request
before it is documented.identifier
- an identifier for the API call that is being documentedresponsePreprocessor
- the response preprocessorsnippets
- the snippets that will document the API callResultHandler
that will produce the documentationMockMvc.perform(org.springframework.test.web.servlet.RequestBuilder)
,
ResultActions.andDo(org.springframework.test.web.servlet.ResultHandler)
public static RestDocumentationResultHandler document(String identifier, OperationRequestPreprocessor requestPreprocessor, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets)
identifier
using the given
snippets
. The given requestPreprocessor
and
responsePreprocessor
are applied to the request and response respectively
before they are documented.identifier
- an identifier for the API call that is being documentedrequestPreprocessor
- the request preprocessorresponsePreprocessor
- the response preprocessorsnippets
- the snippets that will document the API callResultHandler
that will produce the documentationMockMvc.perform(org.springframework.test.web.servlet.RequestBuilder)
,
ResultActions.andDo(org.springframework.test.web.servlet.ResultHandler)