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 theSnippetConfigurerP- the concrete type of theOperationPreprocessorsConfigurerT- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidapply(Map<String, Object> configuration, RestDocumentationContext context) Applies this configurer to the givenconfigurationwithin the givencontext.abstract PReturns anOperationPreprocessorsConfigurerthat can be used to configure the operation request and response preprocessors that will be used.abstract Ssnippets()Returns aSnippetConfigurerthat can be used to configure the snippets that will be generated.final TtemplateEngine(TemplateEngine templateEngine) Configures theTemplateEnginethat will be used for snippet rendering.final TwriterResolver(WriterResolver writerResolver) Configures theWriterResolverthat will be used to resolve a writer for a snippet.
-
Constructor Details
-
RestDocumentationConfigurer
public RestDocumentationConfigurer()
-
-
Method Details
-
snippets
Returns aSnippetConfigurerthat can be used to configure the snippets that will be generated.- Returns:
- the snippet configurer
-
operationPreprocessors
Returns anOperationPreprocessorsConfigurerthat can be used to configure the operation request and response preprocessors that will be used.- Returns:
- the operation preprocessors configurer
-
templateEngine
Configures theTemplateEnginethat will be used for snippet rendering.- Parameters:
templateEngine- the template engine to use- Returns:
this
-
writerResolver
Configures theWriterResolverthat 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 givenconfigurationwithin the givencontext.- Parameters:
configuration- the configurationcontext- the current context
-