Class OperationPreprocessorsConfigurer<PARENT,TYPE>

java.lang.Object
org.springframework.restdocs.config.AbstractConfigurer
org.springframework.restdocs.config.AbstractNestedConfigurer<PARENT>
org.springframework.restdocs.config.OperationPreprocessorsConfigurer<PARENT,TYPE>
Type Parameters:
PARENT - the type of the configurer's parent
TYPE - the concrete type of the configurer to be returned from chained methods
Direct Known Subclasses:
MockMvcOperationPreprocessorsConfigurer, RestAssuredOperationPreprocessorsConfigurer, WebTestClientOperationPreprocessorsConfigurer

public abstract class OperationPreprocessorsConfigurer<PARENT,TYPE> extends AbstractNestedConfigurer<PARENT>
A configurer that can be used to configure the default operation preprocessors.
Since:
2.0.0
Author:
Filip Hrisafov, Andy Wilkinson
  • Constructor Details

    • OperationPreprocessorsConfigurer

      protected OperationPreprocessorsConfigurer(PARENT parent)
      Creates a new OperationPreprocessorConfigurer with the given parent.
      Parameters:
      parent - the parent
  • Method Details

    • apply

      public void apply(Map<String,Object> configuration, RestDocumentationContext context)
      Description copied from class: AbstractConfigurer
      Applies the configurer to the given configuration.
      Specified by:
      apply in class AbstractConfigurer
      Parameters:
      configuration - the configuration to be configured
      context - the current documentation context
    • withRequestDefaults

      public TYPE withRequestDefaults(OperationPreprocessor... preprocessors)
      Configures the default operation request preprocessors.
      Parameters:
      preprocessors - the preprocessors
      Returns:
      this
    • withResponseDefaults

      public TYPE withResponseDefaults(OperationPreprocessor... preprocessors)
      Configures the default operation response preprocessors.
      Parameters:
      preprocessors - the preprocessors
      Returns:
      this