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 RestDocumentationFilterdocument(String identifier, OperationRequestPreprocessor requestPreprocessor, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets) Documents the API call with the givenidentifierusing the givensnippetsin addition to any default snippets.static RestDocumentationFilterdocument(String identifier, OperationRequestPreprocessor requestPreprocessor, Snippet... snippets) Documents the API call with the givenidentifierusing the givensnippetsin addition to any default snippets.static RestDocumentationFilterdocument(String identifier, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets) Documents the API call with the givenidentifierusing the givensnippetsin addition to any default snippets.static RestDocumentationFilterDocuments the API call with the givenidentifierusing the givensnippets.documentationConfiguration(RestDocumentationContextProvider contextProvider) Provides access to aRestAssuredRestDocumentationConfigurerthat can be used to configure Spring REST Docs using the givencontextProvider.
-
Method Details
-
document
Documents the API call with the givenidentifierusing the givensnippets.- Parameters:
identifier- an identifier for the API call that is being documentedsnippets- the snippets that will document the API call- Returns:
- a
RestDocumentationFilterthat will produce the documentation
-
document
public static RestDocumentationFilter document(String identifier, OperationRequestPreprocessor requestPreprocessor, Snippet... snippets) Documents the API call with the givenidentifierusing the givensnippetsin addition to any default snippets. The givenrequestPreprocessoris 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
RestDocumentationFilterthat will produce the documentation
-
document
public static RestDocumentationFilter document(String identifier, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets) Documents the API call with the givenidentifierusing the givensnippetsin addition to any default snippets. The givenresponsePreprocessoris 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
RestDocumentationFilterthat will produce the documentation
-
document
public static RestDocumentationFilter document(String identifier, OperationRequestPreprocessor requestPreprocessor, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets) Documents the API call with the givenidentifierusing the givensnippetsin addition to any default snippets. The givenrequestPreprocessorandresponsePreprocessorare 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
RestDocumentationFilterthat will produce the documentation
-
documentationConfiguration
public static RestAssuredRestDocumentationConfigurer documentationConfiguration(RestDocumentationContextProvider contextProvider) Provides access to aRestAssuredRestDocumentationConfigurerthat can be used to configure Spring REST Docs using the givencontextProvider.- Parameters:
contextProvider- the context provider- Returns:
- the configurer
-