The plugin for building the samples assumed that the current working directory would be the directory containing the project’s build.gradle. While this is generally true on the command line (it isn’t if -project-dir is used), it isn’t true in Gradle’s IDE integration. This was leading to an NPE as the sampleBuild task was being configured to depend on a null task as a result of not finding the sample’s pom.xml or build.grade file. This commit corrects the main build.gradle to configure each sample’s working directory relative to the root project’s directory, rather than relying on the working directory. It also improves SampleBuildConfigurer so that it will throw an exception if it fails to find a sample’s build.gradle or pom.xml rather than continuing and triggering an NPE inside Gradle. Closes gh-185
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.