Commit Graph

73 Commits

Author SHA1 Message Date
Andy Wilkinson
d1881c30e2 Update the samples to use the latest snapshots 2017-09-28 06:57:44 +01:00
Andy Wilkinson
56a0495288 Update the samples to use the latest snapshots 2017-05-12 20:10:47 +01:00
Andy Wilkinson
88db798b25 Update the dependency versions in the samples to use latest snapshots 2017-05-12 12:35:05 +01:00
Gerrit Meier
419547dcdf Add plugin snapshot repository to Data REST sample
Previously, if the main project hadn't been installed in the local
Maven repository (./gradlew install), rest-notes-spring-data-rest
would fail to build as the plugin dependency,
spring-restdocs-asciidoctor, was not available.

This commit corrects the problem by adding
repo.spring.io/libs-snapshot as a plugin repository in addition to
its existing declaration as a "normal" repository.

Fixes gh-382
Closes gh-383
2017-04-24 13:08:53 +01:00
Andy Wilkinson
1e2f2fdd35 Upgrade Spring Boot-based samples to use 1.5.3.RELEASE
Closes gh-358
2017-04-24 12:59:50 +01:00
Andy Wilkinson
14da4b954a Upgrade main build and Gradle-based samples to Gradle 3.4.1 2017-03-23 11:59:13 +00:00
Andy Wilkinson
78982cf515 Add support for REST Assured 3
Closes gh-262
2017-03-20 21:39:25 +00:00
Johnny Lim
39fabc28d4 Fix typo in value of snippets attribute
Closes gh-369
2017-03-20 09:26:42 +00:00
Andy Wilkinson
58bf231c8a Update the samples to use the new operation macro
Closes gh-362
2017-03-08 12:22:00 +00:00
Andy Wilkinson
ca86e3ad8c Upgrade Slate sample to Slate 1.5
Closes gh-361
2017-03-04 22:13:46 +00:00
Andy Wilkinson
3a0f4ab68e Fix the Slate sample's tests
Closes gh-339
2017-03-04 21:43:12 +00:00
Andy Wilkinson
31ad4b40a0 Upgrade the Grails sample to Grails 3.2.6
Closes gh-357
2017-03-03 16:57:55 +00:00
Andy Wilkinson
1393182182 Upgrade Spring Boot-based samples and integration tests to use 1.4
Closes gh-327
2016-10-28 21:25:30 +01:00
Andy Wilkinson
cbd96f301d Update field snippets to no longer document whole subsection by default
Previously, when a field was documented it would implicitly document
the whole subsection of the payload identified by that field. This
could lead to users inadvertently failing to document part of the
payload. Arguably, this was a bug as it violated REST Docs' principle
of producing accurate, detail documentation. However, fixing it
requires a breaking change as people may also be relying on this
behaviour. A balance needed to be struck so the fix is being made in
a minor release.

This commit introduces a new subsectionWithPath method which returns a
SubsectionDescriptor; a specialisation of FieldDescriptor. Users
that were intentionally relying on the old behaviour will have to
replace some usage of fieldWithPath with subsectionWithPath instead.
Users who were unintentionally relying on the old behaviour will have
to add some additional descriptors produced using fieldWithPath and
will receive more accurate documentation in return.

Closes gh-274
2016-10-28 16:12:07 +01:00
Andy Wilkinson
319bd139fc Polish contribution and rework to use default attribute rather than macro
Rather than introducing a custom macro, this commit opts to implicitly
configure the snippets attribute instead. The attribute is configured
will the path into which snippets are generated, relative to the
directory that contains the Asciidoctor document that is being
rendered.

The samples and documentation have been updated to use the new
spring-restdocs-asciidoctor module and the implicitly configured
snippets attribute.

Closes gh-297
2016-10-21 22:42:11 +01:00
Gerrit Meier
3ac4a1acad Provide a default output directory for snippets based on build tool
Rather than requiring an output directory to be explcitly configured,
a default is now automatically configured based on the build tool
that's being used. When using Gradle, snippets will be generated in
build/generated-snippets. When using Maven, snippets will be
generated in target/generated-snippets.

See gh-297
2016-10-21 22:26:58 +01:00
Andy Wilkinson
f2717363f0 Raise the minimum Spring Framework version to 4.3.x
Closes gh-284
2016-07-26 12:09:20 +01:00
Andy Wilkinson
65571d98dd Revert "Upgrade to Gradle 2.14.1"
This reverts commit 5c74bef194 and
commit 10e421a105.

See gh-283
2016-07-25 18:01:55 +01:00
Andy Wilkinson
10e421a105 Upgrade the samples that use Gradle to 2.14.1 as well
See gh-283
2016-07-25 15:39:12 +01:00
Andy Wilkinson
2db7ab5e71 Start work on 1.2.0 2016-07-25 11:08:36 +01:00
Andy Wilkinson
d919238023 Update the samples following the release of 1.1.1.RELEASE 2016-07-25 11:06:49 +01:00
Andy Wilkinson
6c6054178e Upgrade tests and samples to use Spring Boot 1.3.6.RELEASE 2016-07-22 14:41:45 +01:00
Jennifer Strater
42613bf3f9 Add README to Grails sample
Closes gh-254
Closes gh-268
2016-06-27 16:25:04 +01:00
Andy Wilkinson
857525954b Update samples following the release of 1.1.0.RELEASE 2016-06-23 15:41:36 +01:00
Andy Wilkinson
686914071a Configure Grails sample to run tests using a random server port
See gh-250
2016-05-31 10:20:19 +01:00
Andy Wilkinson
d5a2dff210 Update the samples to use Spring Boot 1.3.5.RELEASE 2016-05-31 10:07:19 +01:00
Andy Wilkinson
34ec9d523d Polish "Add Grails sample app" (1338df9)
The sole structural change is to rearrange the build slightly so that,
like the other samples, the version of the Grails sample's REST Docs
dependency is automatically updated.

See gh-250
2016-05-31 10:00:52 +01:00
Jennifer Strater
64803b5fae Add Grails sample app
Closes gh-250
2016-05-31 10:00:40 +01:00
Andy Wilkinson
26ff2ec8a5 Update HATEOAS sample to use new API for generating extra snippets
See gh-249
2016-05-25 12:02:53 +01:00
Andy Wilkinson
5e2552f8c4 Merge branch '1.0.x' 2016-05-05 12:48:23 +01:00
Andy Wilkinson
6a5fd53910 Update Asciidoctor dependencies 2016-05-05 12:47:22 +01:00
Andy Wilkinson
9e84922e09 Upgrade samples to Spring Boot 1.3.3.RELEASE
Closes gh-222
2016-05-05 11:29:45 +01:00
Andy Wilkinson
ba76c2f843 Add a sample showing how to use Spring REST Docs with Slate
Closes gh-124
2016-02-15 17:52:08 +00:00
Andy Wilkinson
b224333c97 Upgrade to Gradle 2.11 2016-02-15 17:17:36 +00:00
Andy Wilkinson
c8ecd25591 Add a sample demonstrating how to use REST Assured
Closes gh-198
2016-02-15 17:12:16 +00:00
Andy Wilkinson
0ef9307481 Add support for manually managing the RestDocumentationContext
In 1.0, the reliance on JUnit was more widespread than it should have
been. It should have been isolated to the JUnit TestRule implementation,
RestDocumentation. Unfortunately, RestDocumentation was also an argument
to MockMvcRestDocumentation.documentationConfiguration which made it
impossible to use Spring REST Docs without having JUnit on the
classpath.

This commit introduces JUnitRestDocumentation and
ManualRestDocumentation. The format is a direct replacement for
RestDocumentation which has been reworked to delegate to
JUnitRestDocumentation. The latter allows manual management of the
RestDocumentationContext, primarily for use with TestNG.

A new interface, RestDocumentationContextProvider, has been introduced.
It is implemented by RestDocumentation, JUnitRestDocumentation and
ManualRestDocumentation.
MockMvcRestDocumentation.documentationConfiguration has been overridden
to also accept a RestDocumentationContextProvider. The method that
accepts a RestDocumentation has been deprecated, as has
RestDocumentation itself.

The documentation has been updated to encourage the use of
JUnitRestDocumentation and a sample illustrating the use of Spring REST
Docs with TestNG has been added.

Closes gh-171
2016-02-09 17:31:32 +00:00
Andy Wilkinson
99a2e4f0e0 Update the samples to build against 1.0.2 snapshots 2015-12-10 09:55:36 +00:00
Andy Wilkinson
504ba8c29c Merge branch '1.0.x' 2015-12-09 21:05:33 +00:00
Andy Wilkinson
f6f4b77331 Upgrade the samples to use the latest Asciidoctor plugins 2015-12-09 10:52:19 +00:00
Andy Wilkinson
939769db11 Upgrade the samples to Spring Boot 1.2.7.RELEASE 2015-12-09 10:50:20 +00:00
Andy Wilkinson
9a3e4c5f70 Update the samples to build against 1.0.1 snapshots 2015-10-22 10:04:56 +01:00
Andy Wilkinson
697275f347 Begin development of 1.1.0 2015-10-15 17:51:17 +01:00
Andy Wilkinson
f07f23ec85 Update versions of various dependencies 2015-10-06 16:49:07 +01:00
Andy Wilkinson
c97efcce2e Use the Maven Wrapper in the Spring Data REST-based sample
Closes gh-146
2015-10-06 16:41:34 +01:00
Andy Wilkinson
723b7a284f Use default location for .adoc source in Gradle-based sample
Previously both samples supported Maven and Gradle. Due to the different
default locations between the two build systems, the Gradle-based sample
was configured to use Maven’s default location for its .adoc files.

The samples have now been updated so that one sample uses Maven and the
other uses Gradle. However, when this change was made, the customization
of the Gradle-based sample’s .adoc file location wasn’t removed.

This commit updates the Gradle-based sample to use the default location,
src/docs/asciidoc, for its .adoc source files.

Closes gh-145
2015-10-05 10:22:55 +01:00
andreasevers
48f4d1343a Add support for documenting HTTP headers
This commit adds support for documenting HTTP headers in both requests
and responses.

Closes gh-140
2015-09-29 12:55:26 +01:00
Andy Wilkinson
130a230105 Configure checkstyle and update code to comply
This commit configures Checkstyle and updates the build to comply with
that configuration. The Eclipse JDT metadata has also been updated
so that the output of Eclipse’s code formatting and clean-up is
compliant with Checkstyle.

The use of the latest version (6.10.1) of Checkstyle has required an
upgrade to Gradle 2.7. Gradle hardcode’s the name of the Checkstyle’s
main class which has changed between version 5 (Gradle’s default) and
version 6.

Closes gh-119
2015-09-23 15:50:42 +01:00
Oliver Trosien
387257ba6f Fix typos in sample asciidoc
Closes gh-129
2015-09-18 21:21:12 -04:00
Andy Wilkinson
11c0945d10 Polish the documentation produced by the samples
- Correct the location of the Git repository
- Correct the location of the sample within the repository
- Update the build instructions for the Data REST sample to use Maven
- Move the table of contents to the left
- Add section links

Closes gh-113
2015-09-10 10:00:18 +01:00
Andy Wilkinson
1e53502958 Make milestone builds are available to the samples 2015-09-08 16:07:15 +01:00