Class RestAssuredRestDocumentation
java.lang.Object
org.springframework.restdocs.restassured.RestAssuredRestDocumentation
Static factory methods for documenting RESTful APIs using REST Assured.
- Since:
- 1.2.0
- Author:
- Andy Wilkinson
-
Method Summary
Modifier and TypeMethodDescriptionstatic RestDocumentationFilter
document
(String identifier, OperationRequestPreprocessor requestPreprocessor, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets) Documents the API call with the givenidentifier
using the givensnippets
in addition to any default snippets.static RestDocumentationFilter
document
(String identifier, OperationRequestPreprocessor requestPreprocessor, Snippet... snippets) Documents the API call with the givenidentifier
using the givensnippets
in addition to any default snippets.static RestDocumentationFilter
document
(String identifier, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets) Documents the API call with the givenidentifier
using the givensnippets
in addition to any default snippets.static RestDocumentationFilter
Documents the API call with the givenidentifier
using the givensnippets
.documentationConfiguration
(RestDocumentationContextProvider contextProvider) Provides access to aRestAssuredRestDocumentationConfigurer
that can be used to configure Spring REST Docs using the givencontextProvider
.
-
Method Details
-
document
Documents the API call with the givenidentifier
using the givensnippets
.- Parameters:
identifier
- an identifier for the API call that is being documentedsnippets
- the snippets that will document the API call- Returns:
- a
RestDocumentationFilter
that will produce the documentation
-
document
public static RestDocumentationFilter document(String identifier, OperationRequestPreprocessor requestPreprocessor, Snippet... snippets) Documents the API call with the givenidentifier
using the givensnippets
in addition to any default snippets. The givenrequestPreprocessor
is applied to the request before it is documented.- Parameters:
identifier
- an identifier for the API call that is being documentedrequestPreprocessor
- the request preprocessorsnippets
- the snippets- Returns:
- a
RestDocumentationFilter
that will produce the documentation
-
document
public static RestDocumentationFilter document(String identifier, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets) Documents the API call with the givenidentifier
using the givensnippets
in addition to any default snippets. The givenresponsePreprocessor
is applied to the request before it is documented.- Parameters:
identifier
- an identifier for the API call that is being documentedresponsePreprocessor
- the response preprocessorsnippets
- the snippets- Returns:
- a
RestDocumentationFilter
that will produce the documentation
-
document
public static RestDocumentationFilter document(String identifier, OperationRequestPreprocessor requestPreprocessor, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets) Documents the API call with the givenidentifier
using the givensnippets
in addition to any default snippets. The givenrequestPreprocessor
andresponsePreprocessor
are applied to the request and response respectively before they are documented.- Parameters:
identifier
- an identifier for the API call that is being documentedrequestPreprocessor
- the request preprocessorresponsePreprocessor
- the response preprocessorsnippets
- the snippets- Returns:
- a
RestDocumentationFilter
that will produce the documentation
-
documentationConfiguration
public static RestAssuredRestDocumentationConfigurer documentationConfiguration(RestDocumentationContextProvider contextProvider) Provides access to aRestAssuredRestDocumentationConfigurer
that can be used to configure Spring REST Docs using the givencontextProvider
.- Parameters:
contextProvider
- the context provider- Returns:
- the configurer
-