Class HttpResponseSnippet
java.lang.Object
org.springframework.restdocs.snippet.TemplatedSnippet
org.springframework.restdocs.http.HttpResponseSnippet
- All Implemented Interfaces:
Snippet
A
Snippet
that documents an HTTP response.- Author:
- Andy Wilkinson
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a newHttpResponseSnippet
with no additional attributes.protected
HttpResponseSnippet
(Map<String, Object> attributes) Creates a newHttpResponseSnippet
with the given additionalattributes
that 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
-
HttpResponseSnippet
protected HttpResponseSnippet()Creates a newHttpResponseSnippet
with no additional attributes. -
HttpResponseSnippet
Creates a newHttpResponseSnippet
with the given additionalattributes
that will be included in the model during template rendering.- Parameters:
attributes
- the additional attributes
-
-
Method Details
-
createModel
Description copied from class:TemplatedSnippet
Create the model that should be used during template rendering to document the givenoperation
. Any additional attributes that were supplied when thisTemplatedSnippet
were created will be automatically added to the model prior to rendering.- Specified by:
createModel
in classTemplatedSnippet
- Parameters:
operation
- the operation- Returns:
- the model
-