Commit Graph

712 Commits

Author SHA1 Message Date
Andy Wilkinson
99ee889708 Make JUnit Jupiter extension stateless so it can be used in parallel
Previously, REST Docs' JUnit Jupiter extension,
RestDocumentationExtension, stored its own state. Since the code
was written I have learned that this isn't recommended and that the
extension context's store should be used instead. Up until now, we'd
got away with the extension being stateful, but the introduction of
parallel test execution has highlighted the problem.

This commit updates RestDocumentationExtension to use the store from
the execution context rather than storing its own state. An unwanted,
but necessary, side-effect of this is that RestDocumentationExtension
itself no longer implements RestDocumentationContextProvider and,
instead, returns a new type rather than itself when asked to resolve
the provider. This is technically a breaking API change, but users
will be unaffected if they have followed the recommended and
documented approach of injecting RestDocumentationContextProvider.

Closes gh-520
2018-06-26 10:21:30 +01:00
Andy Wilkinson
b99f494ed8 Merge pull request #521 from jojoldu
* gh-521:
  Configure bootJar task to add documentation to Spring Boot fat jar
2018-06-26 09:23:03 +01:00
이동욱
e7c59fdaf6 Configure bootJar task to add documentation to Spring Boot fat jar
Closes gh-521
2018-06-26 09:21:16 +01:00
Andy Wilkinson
2a1a3bcc7d Merge branch '1.2.x' 2018-06-25 17:07:45 +01:00
Andy Wilkinson
20bc7b3cd8 Polish 2018-06-25 17:07:37 +01:00
Andy Wilkinson
a8711e984d Merge branch '1.2.x' 2018-06-25 16:59:31 +01:00
Andy Wilkinson
7476562d22 Consider optional empty arrays to be absent when finding missing fields
Closes gh-519
2018-06-25 16:59:19 +01:00
Andy Wilkinson
cd9461ece4 Merge branch '1.2.x' 2018-06-25 16:26:00 +01:00
Andy Wilkinson
7e49a20cb0 Merge pull request #507 from Renann Prado
* gh-507:
  Polish "Fix typo in OperationResponsePreprocessor javadoc"
  Fix typo in OperationResponsePreprocessor javadoc
2018-06-25 16:25:50 +01:00
Andy Wilkinson
c29d094f05 Polish "Fix typo in OperationResponsePreprocessor javadoc"
Closes gh-507
2018-06-25 16:25:34 +01:00
Renann Prado
94a57c33cf Fix typo in OperationResponsePreprocessor javadoc
See gh-507
2018-06-25 16:25:34 +01:00
Andy Wilkinson
da0ee5ad00 Merge branch '1.2.x' 2018-06-25 16:21:52 +01:00
Andy Wilkinson
86c31c96b9 Avoid duplication of parameters when POSTing form URL encoded bodies
Previously if a request body contained form URL encoded content,
parameters would be duplicated in the request body and in the
request URL in the curl, HTTPie, and HTTP request snippets.

This commit updates the affected snippets so that parameters are not
added to the URL when they will also be represented in the request
body.

Closes gh-514
2018-06-25 16:21:39 +01:00
Andy Wilkinson
7ad284c407 Polish 2018-06-17 14:04:03 +01:00
Andy Wilkinson
88ccc2baa6 Merge branch 'gh-515' 2018-06-17 12:59:10 +01:00
Andy Wilkinson
a60b87990b Tolerate changes to request body reading in Framework 5.1
Previously, MockHttpServletRequest allowed its body to be ready
multiple times using its InputStream. As of recent Spring Framework
5.1 snapshots, this is no longer the case.

This commit moves to directly accessing the request's content as a
byte array using getContentAsByteArray() which was introduced in
Framework 5.0.

Closes gh-515
2018-06-17 12:55:56 +01:00
Andy Wilkinson
026af2de2a Add matrix testing infrastructure 2018-06-17 08:01:41 +01:00
Andy Wilkinson
a1198069be Merge branch '1.2.x' 2018-04-24 08:35:38 +01:00
Andy Wilkinson
1e35e8279c Polish Slate sample's README 2018-04-24 08:35:13 +01:00
Andy Wilkinson
cafd526d86 Update the samples to build against 2.0.2 samples 2018-04-23 17:52:47 +01:00
Spring Buildmaster
0aa593b3fa Next development version 2018-04-04 10:44:04 +00:00
Andy Wilkinson
a4c8c12762 Disable Gradle's daemon when building the samples 2018-04-04 11:25:26 +01:00
Andy Wilkinson
7ccc26dca7 Merge branch '1.2.x' 2018-04-04 10:55:22 +01:00
Andy Wilkinson
a2b62e025a Update samples to use 1.2.5 snapshots 2018-04-04 10:55:02 +01:00
Spring Buildmaster
037d572e2c Next development version 2018-04-04 09:23:04 +00:00
Andy Wilkinson
1751910898 Polish 2018-04-04 09:41:31 +01:00
Andy Wilkinson
2ed58da83f Upgrade to Hibernate Validator 6.0.9
Closes gh-503
2018-04-04 09:21:28 +01:00
Andy Wilkinson
4db9f2afc0 Upgrade to Jackson Databind 2.9.5
Closes gh-502
2018-04-04 09:20:12 +01:00
Andy Wilkinson
f9a55df853 Upgrade to Spring Framework 5.0.5.RELEASE
Closes gh-501
2018-04-04 09:19:03 +01:00
Andy Wilkinson
bfdbf2a70b Merge branch '1.2.x' 2018-04-04 09:17:56 +01:00
Andy Wilkinson
4c6cccac24 Upgrade to REST Assured 3.0.7
Closes gh-500
2018-04-04 09:13:17 +01:00
Andy Wilkinson
39733893c1 Upgrade to Spring Framework 4.3.15
Closes gh-499
2018-04-04 09:08:05 +01:00
Andy Wilkinson
13fde96fed Merge pull request #493 from Joe McCall
* gh-493:
  Polish "Move UriModifyingOperationPreprocessor to core project"
  Move UriModifyingOperationPreprocessor to core project
2018-03-28 11:45:33 +01:00
Andy Wilkinson
e7d2d44a05 Polish "Move UriModifyingOperationPreprocessor to core project"
Closes gh-493
2018-03-28 11:44:50 +01:00
Joe McCall
37f313c766 Move UriModifyingOperationPreprocessor to core project
This functionality does not rely on RestAssured, and could prove
useful to other Spring REST Docs extensions.

See gh-493
2018-03-28 11:38:30 +01:00
Andy Wilkinson
3e12e808b0 Merge branch '1.2.x' 2018-03-28 10:11:20 +01:00
Andy Wilkinson
baa8e6bb90 Document an example of the operation macro's equivalent Asciidoctor
Closes gh-470
2018-03-28 10:10:10 +01:00
Andy Wilkinson
45d27f2ca1 Merge branch '1.2.x' 2018-03-28 09:50:20 +01:00
Andy Wilkinson
1c08000bcf Retain subsection extractor when adding field descriptors with prefix
Closes gh-480
2018-03-28 09:46:27 +01:00
Andy Wilkinson
9bb3dda66e Use compatibility rather than equality to identify form encoded requests
Closes gh-496
2018-03-28 09:27:25 +01:00
Andy Wilkinson
fa5e2366d2 Merge branch '1.2.x' 2018-03-27 16:08:39 +01:00
Andy Wilkinson
7924d5fb01 Disable formatting of monospaced text in Asciidoctor templates
Previously, if text enclosed in ` characters contained multiple *
characters, the *s would be removed and the characters they enclosed
would become bold.

This commit escapes the text by enclosing it in + characters in
addition to the existing, enclosing ` characters. The `+text+`
arrangement retains the monospace formatting be disables any further
formatting of the text.

Closes gh-474
2018-03-27 16:08:11 +01:00
Andy Wilkinson
223d2cc9a4 Try to isolate Grails sample from Bintray outages 2018-03-27 15:29:15 +01:00
Andy Wilkinson
8e338b6c73 Merge branch '1.2.x' 2018-03-27 15:27:15 +01:00
Andy Wilkinson
0b0c9e1cc4 Perform attribute substitution on operation macro's target
Closes gh-491
2018-03-27 15:24:00 +01:00
Andy Wilkinson
097b38d5c5 Update the Spring Boot-based samples to use 2.0.0.RELEASE
Closes gh-494
2018-03-27 15:16:08 +01:00
Andy Wilkinson
b150beb9be Merge branch '1.2.x' 2018-03-27 14:30:19 +01:00
Andy Wilkinson
ecbb3a8d67 Merge pull request #477 from Pierre-Jean Vardanega
* gh-477:
  Convert query parameters list as param=1&param=2 instead of param=1,2
2018-03-27 14:26:14 +01:00
Pierre-Jean Vardanega
586de30212 Convert query parameters list as param=1&param=2 instead of param=1,2
Closes gh-477
2018-03-27 14:25:33 +01:00
Andy Wilkinson
7f91d5f2e5 Merge branch '1.2.x' 2018-03-27 14:13:45 +01:00