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
ModifierConstructorDescriptionprotected
Creates a newHttpRequestSnippet
with no additional attributes.protected
HttpRequestSnippet
(Map<String, Object> attributes) Creates a newHttpRequestSnippet
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
-
HttpRequestSnippet
protected HttpRequestSnippet()Creates a newHttpRequestSnippet
with no additional attributes. -
HttpRequestSnippet
Creates a newHttpRequestSnippet
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
-