Class RestDocumentationFilter

java.lang.Object
org.springframework.restdocs.restassured.RestDocumentationFilter
All Implemented Interfaces:
io.restassured.filter.Filter

public class RestDocumentationFilter extends Object implements io.restassured.filter.Filter
A REST Assured Filter for documenting RESTful APIs.
Since:
1.2.0
Author:
Andy Wilkinson
  • Method Summary

    Modifier and Type
    Method
    Description
    document(Snippet... snippets)
    Creates a new RestDocumentationFilter that will produce documentation using the given snippets.
    final io.restassured.response.Response
    filter(io.restassured.specification.FilterableRequestSpecification requestSpec, io.restassured.specification.FilterableResponseSpecification responseSpec, io.restassured.filter.FilterContext context)
     
    protected Map<String,Object>
    getConfiguration(io.restassured.specification.FilterableRequestSpecification requestSpec, io.restassured.filter.FilterContext context)
    Returns the configuration that should be used when calling the delgate.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • filter

      public final io.restassured.response.Response filter(io.restassured.specification.FilterableRequestSpecification requestSpec, io.restassured.specification.FilterableResponseSpecification responseSpec, io.restassured.filter.FilterContext context)
      Specified by:
      filter in interface io.restassured.filter.Filter
    • getConfiguration

      protected Map<String,Object> getConfiguration(io.restassured.specification.FilterableRequestSpecification requestSpec, io.restassured.filter.FilterContext context)
      Returns the configuration that should be used when calling the delgate. The configuration is derived from the given requestSpec and context.
      Parameters:
      requestSpec - the request specification
      context - the filter context
      Returns:
      the configuration
    • document

      public final RestDocumentationFilter document(Snippet... snippets)
      Creates a new RestDocumentationFilter that will produce documentation using the given snippets.
      Parameters:
      snippets - the snippets
      Returns:
      the new result handler