Class HttpRequestSnippet
java.lang.Object
org.springframework.restdocs.snippet.TemplatedSnippet
org.springframework.restdocs.http.HttpRequestSnippet
- All Implemented Interfaces:
Snippet
A
Snippet that documents an HTTP request.- Author:
- Andy Wilkinson
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newHttpRequestSnippetwith no additional attributes.protectedHttpRequestSnippet(Map<String, Object> attributes) Creates a newHttpRequestSnippetwith the given additionalattributesthat will be included in the model during template rendering. -
Method Summary
Modifier and TypeMethodDescriptioncreateModel(Operation operation) Create the model that should be used during template rendering to document the givenoperation.Methods inherited from class org.springframework.restdocs.snippet.TemplatedSnippet
document, getAttributes, getSnippetName
-
Constructor Details
-
HttpRequestSnippet
protected HttpRequestSnippet()Creates a newHttpRequestSnippetwith no additional attributes. -
HttpRequestSnippet
Creates a newHttpRequestSnippetwith the given additionalattributesthat will be included in the model during template rendering.- Parameters:
attributes- the additional attributes
-
-
Method Details
-
createModel
Description copied from class:TemplatedSnippetCreate the model that should be used during template rendering to document the givenoperation. Any additional attributes that were supplied when thisTemplatedSnippetwere created will be automatically added to the model prior to rendering.- Specified by:
createModelin classTemplatedSnippet- Parameters:
operation- the operation- Returns:
- the model
-