Break cycle caused by introduction of RestDocumentationHandler
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
package org.springframework.restdocs.restassured;
|
||||
|
||||
import org.springframework.restdocs.RestDocumentation;
|
||||
import org.springframework.restdocs.RestDocumentationHandler;
|
||||
import org.springframework.restdocs.generate.RestDocumentationGenerator;
|
||||
import org.springframework.restdocs.operation.preprocess.OperationRequestPreprocessor;
|
||||
import org.springframework.restdocs.operation.preprocess.OperationResponsePreprocessor;
|
||||
import org.springframework.restdocs.snippet.Snippet;
|
||||
@@ -46,7 +46,7 @@ public abstract class RestAssuredRestDocumentation {
|
||||
* @return a {@link RestDocumentationFilter} that will produce the documentation
|
||||
*/
|
||||
public static RestDocumentationFilter document(String identifier, Snippet... snippets) {
|
||||
return new RestDocumentationFilter(new RestDocumentationHandler<>(identifier,
|
||||
return new RestDocumentationFilter(new RestDocumentationGenerator<>(identifier,
|
||||
REQUEST_CONVERTER, RESPONSE_CONVERTER, snippets));
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public abstract class RestAssuredRestDocumentation {
|
||||
*/
|
||||
public static RestDocumentationFilter document(String identifier,
|
||||
OperationRequestPreprocessor requestPreprocessor, Snippet... snippets) {
|
||||
return new RestDocumentationFilter(new RestDocumentationHandler<>(identifier,
|
||||
return new RestDocumentationFilter(new RestDocumentationGenerator<>(identifier,
|
||||
REQUEST_CONVERTER, RESPONSE_CONVERTER, requestPreprocessor, snippets));
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public abstract class RestAssuredRestDocumentation {
|
||||
*/
|
||||
public static RestDocumentationFilter document(String identifier,
|
||||
OperationResponsePreprocessor responsePreprocessor, Snippet... snippets) {
|
||||
return new RestDocumentationFilter(new RestDocumentationHandler<>(identifier,
|
||||
return new RestDocumentationFilter(new RestDocumentationGenerator<>(identifier,
|
||||
REQUEST_CONVERTER, RESPONSE_CONVERTER, responsePreprocessor, snippets));
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public abstract class RestAssuredRestDocumentation {
|
||||
public static RestDocumentationFilter document(String identifier,
|
||||
OperationRequestPreprocessor requestPreprocessor,
|
||||
OperationResponsePreprocessor responsePreprocessor, Snippet... snippets) {
|
||||
return new RestDocumentationFilter(new RestDocumentationHandler<>(identifier,
|
||||
return new RestDocumentationFilter(new RestDocumentationGenerator<>(identifier,
|
||||
REQUEST_CONVERTER, RESPONSE_CONVERTER, requestPreprocessor,
|
||||
responsePreprocessor, snippets));
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.restdocs.RestDocumentationContext;
|
||||
import org.springframework.restdocs.RestDocumentationHandler;
|
||||
import org.springframework.restdocs.generate.RestDocumentationGenerator;
|
||||
import org.springframework.restdocs.snippet.Snippet;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -37,10 +37,10 @@ import com.jayway.restassured.specification.FilterableResponseSpecification;
|
||||
*/
|
||||
public final class RestDocumentationFilter implements Filter {
|
||||
|
||||
private final RestDocumentationHandler<FilterableRequestSpecification, Response> delegate;
|
||||
private final RestDocumentationGenerator<FilterableRequestSpecification, Response> delegate;
|
||||
|
||||
RestDocumentationFilter(
|
||||
RestDocumentationHandler<FilterableRequestSpecification, Response> delegate) {
|
||||
RestDocumentationGenerator<FilterableRequestSpecification, Response> delegate) {
|
||||
Assert.notNull(delegate, "delegate must be non-null");
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user