Commit Graph

499 Commits

Author SHA1 Message Date
Andy Wilkinson
1b5e75ff2c Polish "Include cookies in the HTTP response snippet"
See gh-340
Closes gh-305
2017-03-13 20:46:05 +00:00
Tomasz Kopczynski
46190535f7 Include cookies in the HTTP response snippet
See gh-305
Closes gh-340
2017-03-13 20:44:33 +00:00
Andy Wilkinson
ece826166f Merge branch '1.1.x' 2017-03-08 13:07:50 +00:00
Andy Wilkinson
5a76decc11 Link to correct branch on GitHub in snapshot documentation
Closes gh-367
2017-03-08 13:07:09 +00:00
Andy Wilkinson
70df55d413 Use code block switch extension from separate project
Closes gh-229
2017-03-08 13:04:27 +00:00
Andy Wilkinson
539cc1756e Merge branch '1.1.x' 2017-03-08 12:38:11 +00:00
Andy Wilkinson
81c2816693 Relax field type validation when marked as optional and value is null
Previously, if a field was marked as optional and it appeared in a
payload with a null value a failure would occur if the field's type
was configured to be a JsonFieldType other than NULL.

This commit relaxes this restriction so that a null value is tolerated
when a field has been marked as optional.

Closes gh-365
2017-03-08 12:38:03 +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
4a177de1f6 Merge branch '1.1.x' 2017-03-08 12:21:30 +00:00
Andy Wilkinson
281abb2e8b Ensure that Gradle's daemon is always disabled 2017-03-08 12:20:55 +00:00
Andy Wilkinson
a4d2fc39d8 Allow snippet section titles to be customized using document attributes
Closes gh-363
2017-03-08 10:41:54 +00:00
Andy Wilkinson
86f6dbab9c Specify an ID for each section created by the operation macro
Closes gh-364
2017-03-08 09:45:02 +00:00
Andy Wilkinson
40fc211d9e Polishing 2017-03-07 18:42:01 +00:00
Andy Wilkinson
6f7be570f7 Another attempt at fixing OperationBlockMacroTests on Windows
It appears that Asciidoctor uses \n on all platforms but when the
expected content is read in on Windows it uses \r\n as the line
endings are being changed when Git performs the clone.
2017-03-07 18:37:27 +00:00
Andy Wilkinson
d3fdd0bef7 Fix OperationBlockMacroTests on Windows 2017-03-07 18:30:00 +00:00
Andy Wilkinson
347f14f617 Merge pull request #354 from Gerrit Meier
* gh-323:
  Polish “Provide a block macro for including an operation's snippets”
  Provide a block macro for including an operation's snippets
2017-03-07 17:29:50 +00:00
Andy Wilkinson
826e0a5dec Polish “Provide a block macro for including an operation's snippets”
- Copy snippets used in the tests in @BeforeClass rather than using
   Gradle so that the tests can be run easily in an IDE
 - Address problems in operation_block_macro.rb reported by Rubocop
 - Rename new test class to more closely match the name of the Ruby
   class that it’s testing
 - Gracefully handle a missing operation
 - Align behaviour when an operation or snippet is missing more closely
   with Asciidoctor’s behaviour when an include references a missing
   file
 - Use kebab-case rather than snake_case for new test resources
 - Update the documentation to describe the new macro

See gh-354
Closes gh-323
2017-03-07 17:27:29 +00:00
Gerrit Meier
18b559a839 Provide a block macro for including an operation's snippets
See gh-323
Closes gh-354
2017-03-07 16:46:57 +00:00
Andy Wilkinson
3cc6f2d7d5 Merge branch '1.1.x' 2017-03-05 17:28:45 +00:00
Andy Wilkinson
2fa0aa4472 Further tweaks to try and get builds on Travis to work reliably 2017-03-05 17:28:31 +00:00
Andy Wilkinson
73fac5ca31 Merge branch '1.1.x' 2017-03-05 16:23:56 +00:00
Andy Wilkinson
17acbb9fbf Upgrade Travis configuration to use a recent version of Oracle JDK 8
By default, Travis uses a rather old version of Oracle's JDK 8 in
its container-based infrastructure. It would appear that this is what
has been causing the build to fail with minimal diagnostics.

This commit implements a suggestion [1] to get a more recent version
of Java 8 by installing the oracle-java8-installer package via the APT
addon.

[1] https://github.com/travis-ci/travis-ci/issues/3259#issuecomment-130860338
2017-03-05 16:23:47 +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
e9ceeacd66 Merge branch '1.1.x' 2017-03-04 21:05:07 +00:00
Andy Wilkinson
727f6ccd78 Protect the tests against changes to MockMvc's HTTP header ordering
Closes gh-359
2017-03-04 20:45:47 +00:00
Andy Wilkinson
7cb91f9963 Remove use of Spring Boot from REST Assured module's integration tests
Closes gh-360
2017-03-04 20:40:42 +00:00
Andy Wilkinson
b6f986556e Upgrade to Gradle 3.4
Closes gh-283
2017-03-03 21:03:39 +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
722048e20f Introduce RequestCookie to avoid core depending on the Servlet API
Closes gh-345
2017-02-03 14:55:18 +00:00
Andy Wilkinson
ccb31ecfb2 Merge pull request #336 from Tomasz Kopczynski
* gh-336:
  Polish "Include cookies in request snippets"
  Include cookies in request snippets
2017-02-02 14:56:59 +00:00
Andy Wilkinson
a9c1e04081 Polish "Include cookies in request snippets"
See gh-336

Closes gh-302
Closes gh-303
Closes gh-304
2017-02-02 14:50:22 +00:00
Tomasz Kopczynski
25bc6c37da Include cookies in request snippets
Closes gh-336
See gh-302, gh-303, gh-304
2017-02-02 14:49:45 +00:00
Andy Wilkinson
0337160e80 Merge pull request #343 from Florian Benz
* gh-343:
  Add spring-auto-restdocs to third-party extensions
2017-01-30 17:14:00 +00:00
Florian Benz
7e4a865d1b Add spring-auto-restdocs to third-party extensions
Closes gh-343
2017-01-30 17:13:05 +00:00
Andy Wilkinson
677a23647f Compile and test against Spring Framework 4.3.6.RELEASE
This commit upgrade to Spring Framework 4.3.6.RELEASE. A side-effect
of this change is that the Content-Type header is now always the first
header when building a request with MockMvc. One test has been updated
to reflect this change in ordering.

Closes gh-342
2017-01-25 20:00:36 +00:00
Andy Wilkinson
e2041333a6 Merge branch '1.1.x' 2016-12-16 14:45:10 +00:00
Andy Wilkinson
a19aef796f Merge pull request #329 from Gerrit Meier
* gh-329:
  Document that port is omitted when it matches the scheme's default
2016-12-16 14:41:37 +00:00
Gerrit Meier
2fb3ede3a6 Document that port is omitted when it matches the scheme's default
Closes gh-325
Closes gh-329
2016-12-16 14:41:30 +00:00
Andy Wilkinson
de39e5b85c Merge branch '1.1.x' 2016-12-16 14:33:50 +00:00
Andy Wilkinson
b7e4edf904 Merge pull request #334 from stonio
* gh-334:
  Clarify that parameterized output directory uses the simple class name
2016-12-16 14:33:26 +00:00
stonio
9bbb60ac2a Clarify that parameterized output directory uses the simple class name
Closes gh-334
2016-12-16 14:32:35 +00:00
Andy Wilkinson
dec3727da1 Add support for documenting body of a request, response or request part
Closes gh-318
Closes gh-319
2016-10-31 16:34:08 +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
88d5e9192e Merge branch '1.1.x' 2016-10-28 16:20:01 +01:00
Andy Wilkinson
7ff45d273e Call the right endpoint in REST Assured field reuse example
Closes gh-324
2016-10-28 16:19:19 +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
7bcfbd9e35 Add support for documenting a portion of a request or response payload
Closes gh-312
2016-10-27 10:26:46 +01:00
Andy Wilkinson
60211dab86 Polishing
- Pass attributes into RequestPartFieldsSnippet
 - Add missing package.info.java for new asciidoctor package
2016-10-25 16:10:58 +01:00
Andy Wilkinson
8035b91735 Merge pull request #270 from Mathieu Pousse
* gh-270:
  Polish "Add support for documenting request part payload fields"
  Add support for documenting request part payload fields
2016-10-25 15:56:55 +01:00