use of org.springframework.cloud.contract.wiremock.restdocs.WireMockSnippet in project spring-cloud-netflix by spring-cloud.
the class AbstractDocumentationTests method spec.
private RequestSpecification spec(Object body, Filter... filters) {
RequestSpecBuilder builder = new RequestSpecBuilder().addFilter(documentationConfiguration(this.restDocumentation).snippets().withAdditionalDefaults(new WireMockSnippet()));
for (Filter filter : filters) {
builder = builder.addFilter(filter);
}
RequestSpecification spec = builder.setPort(this.port).build();
if (body != null) {
spec.contentType("application/json").body(body, new EurekaObjectMapper());
}
return spec;
}
Aggregations