Class RestAssuredRestDocumentation

java.lang.Object
org.springframework.restdocs.restassured.RestAssuredRestDocumentation

public abstract class RestAssuredRestDocumentation extends Object
Static factory methods for documenting RESTful APIs using REST Assured.
Since:
1.2.0
Author:
Andy Wilkinson
  • Method Details

    • document

      public static RestDocumentationFilter document(String identifier, Snippet... snippets)
      Documents the API call with the given identifier using the given snippets.
      Parameters:
      identifier - an identifier for the API call that is being documented
      snippets - the snippets that will document the API call
      Returns:
      a RestDocumentationFilter that will produce the documentation
    • document

      public static RestDocumentationFilter document(String identifier, OperationRequestPreprocessor requestPreprocessor, Snippet... snippets)
      Documents the API call with the given identifier using the given snippets in addition to any default snippets. The given requestPreprocessor is applied to the request before it is documented.
      Parameters:
      identifier - an identifier for the API call that is being documented
      requestPreprocessor - the request preprocessor
      snippets - the snippets
      Returns:
      a RestDocumentationFilter that will produce the documentation
    • document

      public static RestDocumentationFilter document(String identifier, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets)
      Documents the API call with the given identifier using the given snippets in addition to any default snippets. The given responsePreprocessor is applied to the request before it is documented.
      Parameters:
      identifier - an identifier for the API call that is being documented
      responsePreprocessor - the response preprocessor
      snippets - the snippets
      Returns:
      a RestDocumentationFilter that will produce the documentation
    • document

      public static RestDocumentationFilter document(String identifier, OperationRequestPreprocessor requestPreprocessor, OperationResponsePreprocessor responsePreprocessor, Snippet... snippets)
      Documents the API call with the given identifier using the given snippets in addition to any default snippets. The given requestPreprocessor and responsePreprocessor are applied to the request and response respectively before they are documented.
      Parameters:
      identifier - an identifier for the API call that is being documented
      requestPreprocessor - the request preprocessor
      responsePreprocessor - the response preprocessor
      snippets - the snippets
      Returns:
      a RestDocumentationFilter that will produce the documentation
    • documentationConfiguration

      public static RestAssuredRestDocumentationConfigurer documentationConfiguration(RestDocumentationContextProvider contextProvider)
      Provides access to a RestAssuredRestDocumentationConfigurer that can be used to configure Spring REST Docs using the given contextProvider.
      Parameters:
      contextProvider - the context provider
      Returns:
      the configurer