Prior to this commit, MockMvc-classes were used throughout Spring REST Docs. For example, each Snippet was called with an MvcResult. This has proven problematic for a few reasons: 1. The MockMvc APIs aren't very amenable to modifying a request or response before it's documented. This caused the existing support for response modification to rely on CGLib proxies and method interceptors. A similary complex solution for request modifiction would also have been necessary. 2. Things are harder to reason about than they need to be as the MockHttpServletRequest and MockHttpServletResponse classes expose more than is required when generating API documentation. 3. Supporting other test frameworks, such as Rest Assured, is hard This commit introduces a new Operation abstract that encapsulates all of the information required to document the request that was sent and the response that was received when performing an operation on a RESTful service. The new abstraction uses types from Spring's Web support, such as HttpHeaders, RequestMethod, and MediaType, but does not rely on MockMvc. Closes gh-108
Spring REST Docs 
Overview
The primary goal of this project is to make it easy to document RESTful services by combining content that's been hand-written using Asciidoctor with auto-generated examples produced with the Spring MVC Test framework. The result is intended to be an easy-to-read user guide, akin to GitHub's API documentation for example, rather than the fully automated, dense API documentation produced by tools like Swagger.
For a broader introduction see the Documenting RESTful APIs presentation. Both the slides and a video recording are available.
Learning more
To learn more about Spring REST Docs, please consult the reference documentation.
Building from source
Spring REST Docs requires Java 7 or later and is built using Gradle:
./gradlew build
Contributing
Pull requests are welcome. Please see the contributor guidelines for details.
Licence
Spring REST Docs is open source software released under the Apache 2.0 license.