Class ContractDslSnippet
java.lang.Object
org.springframework.restdocs.snippet.TemplatedSnippet
org.springframework.cloud.contract.wiremock.restdocs.ContractDslSnippet
- All Implemented Interfaces:
org.springframework.restdocs.snippet.Snippet
public class ContractDslSnippet
extends org.springframework.restdocs.snippet.TemplatedSnippet
A
Snippet
that documents the Spring Cloud
Contract Groovy DSL.- Since:
- 1.0.4
- Author:
- Marcin Grzejszczak
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a newContractDslSnippet
with no additional attributes.protected
ContractDslSnippet
(Map<String, Object> attributes) Creates a newContractDslSnippet
with the given additionalattributes
that will be included in the model during template rendering. -
Method Summary
Modifier and TypeMethodDescriptioncreateModel
(org.springframework.restdocs.operation.Operation operation) void
document
(org.springframework.restdocs.operation.Operation operation) Methods inherited from class org.springframework.restdocs.snippet.TemplatedSnippet
getAttributes, getSnippetName
-
Constructor Details
-
ContractDslSnippet
protected ContractDslSnippet()Creates a newContractDslSnippet
with no additional attributes. -
ContractDslSnippet
Creates a newContractDslSnippet
with the given additionalattributes
that will be included in the model during template rendering.- Parameters:
attributes
- The additional attributes
-
-
Method Details
-
createModel
protected Map<String,Object> createModel(org.springframework.restdocs.operation.Operation operation) - Specified by:
createModel
in classorg.springframework.restdocs.snippet.TemplatedSnippet
-
document
- Specified by:
document
in interfaceorg.springframework.restdocs.snippet.Snippet
- Overrides:
document
in classorg.springframework.restdocs.snippet.TemplatedSnippet
- Throws:
IOException
-