Add a sample showing how to use Spring REST Docs with Slate
Closes gh-124
This commit is contained in:
24
samples/rest-notes-slate/README.md
Normal file
24
samples/rest-notes-slate/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# REST Notes Slate
|
||||
|
||||
This sample shows how to document a RESTful API using Spring REST Docs and [Slate][1].
|
||||
The sample can be built with Gradle, but requires Ruby and the `bundler` gem to
|
||||
be installed.
|
||||
|
||||
## Quickstart
|
||||
|
||||
```
|
||||
./gradlew build
|
||||
open build/docs/api-guide.html
|
||||
```
|
||||
|
||||
## Details
|
||||
|
||||
The bulk of the documentation is written in Markdown in the file named
|
||||
[slate/api-guide.md.erb][2]. When the documentation is built, snippets generated by
|
||||
Spring REST Docs in the [ApiDocumentation][3] tests are incorporated into this
|
||||
documentation by [ERB][4]. The combined Markdown document is then turned into HTML.
|
||||
|
||||
[1]: https://github.com/tripit/slate
|
||||
[2]: slate/api-guide.md.erb
|
||||
[3]: src/test/java/com/example/notes/ApiDocumentation.java
|
||||
[4]: http://ruby-doc.org/stdlib-2.2.3/libdoc/erb/rdoc/ERB.html
|
||||
Reference in New Issue
Block a user