Class HttpDocumentation
java.lang.Object
org.springframework.restdocs.http.HttpDocumentation
Static factory methods for documenting a RESTful API's HTTP requests.
- Author:
- Andy Wilkinson, Jonathan Pearlin
-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpRequestSnippetReturns a newSnippetthat will document the HTTP request for the API operation.static HttpRequestSnippethttpRequest(Map<String, Object> attributes) Returns a newSnippetthat will document the HTTP request for the API operation.static HttpResponseSnippetReturns aSnippetthat will document the HTTP response for the API operation.static HttpResponseSnippethttpResponse(Map<String, Object> attributes) Returns aSnippetthat will document the HTTP response for the API operation.
-
Method Details
-
httpRequest
Returns a newSnippetthat will document the HTTP request for the API operation.- Returns:
- the snippet that will document the HTTP request
-
httpRequest
Returns a newSnippetthat will document the HTTP request for the API operation. The givenattributeswill be available during snippet generation.- Parameters:
attributes- the attributes- Returns:
- the snippet that will document the HTTP request
-
httpResponse
Returns aSnippetthat will document the HTTP response for the API operation.- Returns:
- the snippet that will document the HTTP response
-
httpResponse
Returns aSnippetthat will document the HTTP response for the API operation. The givenattributeswill be available during snippet generation.- Parameters:
attributes- the attributes- Returns:
- the snippet that will document the HTTP response
-