Search code examples
javaspringspring-restdocs

RestDocumentation class is deprecated, what should I use instead?


The documentation for org.springframework.restdocs.RestDocumentation states that it is deprecated.

I am trying to use the class in a JUnit test like this:

@Rule
public RestDocumentation restDocumentation = new RestDocumentation("target/generated-snippets");

What class should I be using instead?


Solution

  • Try JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation("target/generated-snippets")