Test-driven documentation for RESTful services
Java Other
Clone or download
Latest commit 47fe048 Jul 16, 2018
Failed to load latest commit information.
buildSrc/src/main Polish Jun 17, 2018
config Merge branch '1.2.x' Mar 27, 2018
docs Configure bootJar task to add documentation to Spring Boot fat jar Jun 26, 2018
gradle Build with Gradle 4.3 where possible Nov 6, 2017
samples Make JUnit Jupiter extension stateless so it can be used in parallel Jun 26, 2018
spring-restdocs-asciidoctor Perform attribute substitution on operation macro's target Mar 27, 2018
spring-restdocs-core Merge branch '1.2.x' Jul 16, 2018
spring-restdocs-mockmvc Tolerate changes to request body reading in Framework 5.1 Jun 17, 2018
spring-restdocs-restassured Merge branch '1.2.x' Jul 16, 2018
spring-restdocs-webtestclient Restore compatibility with Spring Framework 5.1 when reading request … Jul 16, 2018
.gitignore Add the files that were accidentally excluded by .gitignore Apr 20, 2015
.travis.yml Further tweaks to try and get builds on Travis to work reliably Mar 5, 2017
CODE_OF_CONDUCT.md Introduce a code of conduct Feb 2, 2016
CONTRIBUTING.md Update minimum Java version in README.md and CONTRIBUTING.md Nov 20, 2017
README.md List restdocs-raml in third-party extensions Jan 2, 2018
build.gradle Add matrix testing infrastructure Jun 17, 2018
gradle.properties Next development version Apr 4, 2018
gradlew Upgrade main build and Gradle-based samples to Gradle 3.4.1 Mar 23, 2017
gradlew.bat Upgrade main build and Gradle-based samples to Gradle 3.4.1 Mar 23, 2017
settings.gradle Add support for using WebFlux's WebTestClient to document an API Oct 30, 2017


Spring REST Docs Build status


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

You will need Java 8 or later to build Spring REST Docs. It is built using Gradle:

./gradlew build


Contributors to this project agree to uphold its code of conduct.

There are several that you can contribute to Spring REST Docs:

Third-party extensions

Name Description
restdocs-wiremock Auto-generate WireMock stubs as part of documenting your RESTful API
restdocsext-jersey Enables Spring REST Docs to be used with Jersey's test framework
spring-auto-restdocs Uses introspection and Javadoc to automatically document request and response parameters
restdocs-raml A Spring REST Docs extension that adds RAML support


Spring REST Docs is open source software released under the Apache 2.0 license.