Class RestDocumentationConfigurer<S extends AbstractConfigurer,P extends AbstractConfigurer,T>
java.lang.Object
org.springframework.restdocs.config.RestDocumentationConfigurer<S,P,T>
- Type Parameters:
S
- the concrete type of theSnippetConfigurer
P
- the concrete type of theOperationPreprocessorsConfigurer
T
- the concrete type of this configurer, to be returned from methods that support chaining
- Direct Known Subclasses:
MockMvcRestDocumentationConfigurer
,RestAssuredRestDocumentationConfigurer
,WebTestClientRestDocumentationConfigurer
public abstract class RestDocumentationConfigurer<S extends AbstractConfigurer,P extends AbstractConfigurer,T>
extends Object
Abstract base class for the configuration of Spring REST Docs.
- Since:
- 1.1.0
- Author:
- Andy Wilkinson, Filip Hrisafov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final void
apply
(Map<String, Object> configuration, RestDocumentationContext context) Applies this configurer to the givenconfiguration
within the givencontext
.abstract P
Returns anOperationPreprocessorsConfigurer
that can be used to configure the operation request and response preprocessors that will be used.abstract S
snippets()
Returns aSnippetConfigurer
that can be used to configure the snippets that will be generated.final T
templateEngine
(TemplateEngine templateEngine) Configures theTemplateEngine
that will be used for snippet rendering.final T
writerResolver
(WriterResolver writerResolver) Configures theWriterResolver
that will be used to resolve a writer for a snippet.
-
Constructor Details
-
RestDocumentationConfigurer
public RestDocumentationConfigurer()
-
-
Method Details
-
snippets
Returns aSnippetConfigurer
that can be used to configure the snippets that will be generated.- Returns:
- the snippet configurer
-
operationPreprocessors
Returns anOperationPreprocessorsConfigurer
that can be used to configure the operation request and response preprocessors that will be used.- Returns:
- the operation preprocessors configurer
-
templateEngine
Configures theTemplateEngine
that will be used for snippet rendering.- Parameters:
templateEngine
- the template engine to use- Returns:
this
-
writerResolver
Configures theWriterResolver
that will be used to resolve a writer for a snippet.- Parameters:
writerResolver
- the writer resolver to use- Returns:
this
-
apply
Applies this configurer to the givenconfiguration
within the givencontext
.- Parameters:
configuration
- the configurationcontext
- the current context
-