Commit Graph

11 Commits

Author SHA1 Message Date
Andy Wilkinson
8b2174cb84 Provide build status in the README 2015-01-08 18:11:40 +00:00
Andy Wilkinson
af93a32bde Reflect snapshots being available from https://repo.spring.io/snapshot
Update the README and the samples’ build.gradle and pom.xml files to
reflect snapshots now being available from
https://repo.spring.io/snapshot.

Closes #5
2015-01-08 18:06:38 +00:00
Andy Wilkinson
6ec522069a Make things less Gradle-specific and provide Maven config in samples
Previously, the project provided a Gradle plugin and was only really
intended for use with Gradle. This had influenced a number of design
choices that have proven to be less than ideal when attempting to
use the project with Maven.

This commit backs off from a number of design decisions that worked
well with Gradle but less so with Maven. Part of this is that the
Gradle plugin is (temporarily?) no more. It's been removed in favour
of configuring things directly in build.gradle. While this slightly
increases the amount of configuration required it makes things far
more flexible.

Both samples have been updated with modified Gradle configuration and
new Maven configuration. The README has also been updated to reflect
these changes.
2015-01-08 16:51:47 +00:00
Andy Wilkinson
23e8ad3dae Update the README to reflect the changes to how document is used 2014-12-02 12:20:40 +00:00
Rossen Stoyanchev
e98658266c Update README.md to include link to presentation
Rework the opening paragraph and include a link to the Documenting
RESTful APIs presentation given at Spring Exchange 2014.

Closes gh-2
2014-11-13 15:17:29 +00:00
Andy Wilkinson
d06095ee72 Provide API guide examples alongside existing getting started guides 2014-11-04 17:23:12 +00:00
Andy Wilkinson
3ac27976ea Fix indentation in the README 2014-10-28 15:27:56 +00:00
Andy Wilkinson
01e37f1e4f Remove CGLib proxy “magic” in favour of an explicit document method
Previously, the name of an output file was automatically determined
by the name of the method from which the mockMvc.perform call was made.
While (somewhat) clever, to support this for non @Test methods, this
required the use of a CGLib proxy to push and pop some context that
kept track of the name of the current method. This meant it only worked
for non-private methods. It also made it hard to look at the code and
see what would and would not be documented.

This commit updates the library to provide an explicit document method
instead. This method takes the path of an output directory and a
MockMvc ResultActions instance, typically returned from a call to
mockMvc.perform. For example:

document("index",
        this.mockMvc.perform(get("/").accept(MediaTypes.HAL_JSON))
		.andExpect(status().isOk()));

This will perform a GET request to "/", assert that the response is
200 OK and write documentation snippets for the request and response
to a directory named index.
2014-10-28 15:10:56 +00:00
Andy Wilkinson
aa81f348d7 Fix error in README's markup 2014-10-23 15:47:14 +01:00
Andy Wilkinson
d5afc5d6f2 Update the README to reflect new functionality 2014-10-23 13:43:19 +01:00
Andy Wilkinson
b7904bcad7 Initial commit 2014-10-08 14:04:52 +01:00