78 Commits

Author SHA1 Message Date
Andy Wilkinson
88caf04379 Merge branch '2.0.x'
Closes gh-891
2023-05-11 17:56:16 +01:00
Andy Wilkinson
e741790f02 Upgrade to Spring Java Format 0.0.38
Closes gh-890
2023-05-11 17:51:45 +01:00
Andy Wilkinson
f5a629af34 Handle form and query parameters separately
Previously, form and query parameters were handled together as
request parameters. Howeer, request parameters are a server-side
construct that's specific to the servlet specification. As such
they're not appropriate for the client-side documentation that
Spring REST Docs aims to produce.

This commit replaces support for documenting request parameters
with support for documenting query paramters found in the query
string of the request's URI and for documenting form parameters
found in the form URL encoded body of the request.

Closes gh-832
2022-10-12 10:18:33 +01:00
Andy Wilkinson
d5522f5335 Polish "Add support for documenting request and response cookies"
See gh-592
2022-07-18 14:46:26 +01:00
clydebarrow
f72a9f1067 Add support for documenting request and response cookies
See gh-592
2022-07-18 11:16:16 +01:00
Andy Wilkinson
b4fd66ff9b Merge branch '2.0.x'
Closes gh-829
2022-07-15 12:43:51 +01:00
Andy Wilkinson
ebe70a91c7 Remove redundant throws declarations from non public API
Closes gh-828
2022-07-15 12:38:25 +01:00
Andy Wilkinson
fbad11e0a1 Update documentation examples to use new modifyHeaders preprocessor
Closes gh-827
2022-07-15 11:05:58 +01:00
Andy Wilkinson
5be36f5e9e Merge branch '2.0.x' 2022-06-20 20:44:07 +01:00
izeye
07a6f26755 Polish
See gh-808
2022-06-20 20:42:16 +01:00
Andy Wilkinson
d38d79755b Restore support for REST Assured
Closes gh-784
2022-01-24 11:21:03 +00:00
Andy Wilkinson
5dd1bd4beb Merge branch '2.0.x' 2022-01-10 10:55:24 +00:00
Andy Wilkinson
350a4c65e3 Align fileUpload and multipart methods with MockMvc
Closes gh-770
2022-01-10 10:54:12 +00:00
Andy Wilkinson
d2a5bb26ea Drop support for REST Assured until it supports Jakarta EE 9
Closes gh-761
2021-11-18 15:41:37 +00:00
Andy Wilkinson
4223f70102 Upgrade to Spring Framework 6 and Jakarta EE 9
Closes gh-750
Closes gh-748
2021-11-17 11:18:00 +00:00
Andy Wilkinson
774bed30b9 Raise the minimum version of REST Assured to 4.4
Closes gh-752
2021-11-17 11:18:00 +00:00
Andy Wilkinson
f3e305ab24 Polish 2021-06-15 11:36:33 +01:00
Andy Wilkinson
54d12103a6 Document parameterized output with WebTestClient
Closes gh-713
2021-06-15 11:26:57 +01:00
Andy Wilkinson
2ead1fb0d8 Upgrade to Gradle 6.8 and modernize the build
Closes gh-719
2021-04-28 20:59:20 +01:00
Daniel Shuy
189d235c84 Use @BeforeEach instead of @Before in JUnit 5 examples
See gh-663
2019-12-18 09:44:03 +00:00
Andy Wilkinson
09a4323ed5 Merge branch '1.2.x' 2019-03-19 11:42:23 +00:00
Andy Wilkinson
3282a798cb Merge branch '1.1.x' into 1.2.x 2019-03-19 11:35:06 +00:00
Andy Wilkinson
f7e61013bb Merge branch '1.0.x' into 1.1.x 2019-03-19 11:24:34 +00:00
Andy Wilkinson
75132b537a Use HTTPS to link to Apache license 2019-03-19 11:21:34 +00:00
Andy Wilkinson
ba48a7270a Inject ApplicationContext not WebApplicationContext with WebTestClient
Closes gh-582
2019-02-18 10:19:17 +00:00
차지훈
ba08a78710 Fix typo in REST Assured HTTP headers example
See gh-579
2019-02-14 10:07:35 +00:00
Andy Wilkinson
22dd1e75a4 Apply default scheme, host, and port to WebTestClient URIs
Closes gh-461
2017-11-20 09:50:49 +00:00
Roman Zaynetdinov
2dc48590dd Remove unused custom URI configuration documentation example
Closes gh-457
2017-11-12 15:16:15 +00:00
Andy Wilkinson
ac1d8ec4ac Merge branch '1.2.x' 2017-11-11 18:58:27 +00:00
Michael J. Simons
92b6268da4 Fix name of self rel in reference documentation
Closes gh-449
2017-11-11 18:57:42 +00:00
Andy Wilkinson
1a858a2e1f Build and test against Spring Framework 5.0.1.RELEASE
Closes gh-443
2017-10-30 10:20:25 +00:00
Andy Wilkinson
cfb1fbc85d Add support for using WebFlux's WebTestClient to document an API
Closes gh-384
2017-10-30 09:58:07 +00:00
Andy Wilkinson
eed90c0b9a Polish "Add support for configuring default request and response preprocessors"
Closes gh-424
2017-10-27 12:09:56 +01:00
Filip Hrisafov
4f8b173836 Add support for configuring default request and response preprocessors
See gh-424
2017-10-27 12:09:56 +01:00
Andy Wilkinson
f0c69ade5e Merge branch '1.2.x' 2017-10-23 15:48:32 +01:00
Andy Wilkinson
473e3e1a7b Correct end tag in included source so that it matches opening tag
Closes gh-441
2017-10-23 15:47:42 +01:00
Andy Wilkinson
0e6e785fb0 Add support for JUnit 5
This commit adds support for JUnit 5 and its Jupiter programming
model. A new Jupiter Extension implementation,
RestDocumentationExtension, is provided. This extension can be applied
to a test class to allow it to use Spring REST Docs to document a
RESTful API.

Closes gh-296
2017-05-19 17:29:12 +02:00
Andy Wilkinson
41d537d06a Raise the minimum supported version of Spring Framework to 5.0
This commit upgrades to Spring Framework 5.0.0.RC1. It also upgrades
the Spring Boot-based samples to use Spring Boot 2.0.0.M1 which
supports Spring Framework 5. Lastly, it upgrades a number of
third-party dependencies to align with Spring Framework 5 and Spring
Boot 2.

Closes gh-386
2017-05-18 16:46:03 +02:00
Andy Wilkinson
78982cf515 Add support for REST Assured 3
Closes gh-262
2017-03-20 21:39:25 +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
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
d2a5b38c83 Polish "Add support for documenting request part payload fields"
- Rebase on latest code, and make use of new support for the same
  TemplatedSnippet producing multiple snippets with different names
  from the same template
- Expand the documentation
- Apply code formatting
- Add support for relaxed documentation of a request part's fields

Closes gh-270
2016-10-25 15:56:47 +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
0446c99a10 Polishing
- Correct copyright years
- Add `@since` to javadoc of new public classes
- Make new classes final where appropriate
2016-05-25 11:26:02 +01:00
Andy Wilkinson
42353a0b5f Improve the API for generating additional snippets
Previously, if alwaysDo was used and the user wanted to generate
one or more additional snippets when calling perform a separate call
to `snippets` was made prior to calling `perform`. This had two
problems:

 - it required the result handler to be stateful (see gh-243)
 - it wasn't clear that the additional snippets would be produced when
   a subsequent call to perform was made

This commit introduces a new API that allows the additional snippets
to be specified within the MockMvc call. The old API has been
deprecated and will be removed in 2.0.

Closes gh-249
2016-05-25 11:01:48 +01:00
Johnny Lim
09c9cac857 Polish 2016-05-24 13:23:14 +01:00
Andy Wilkinson
fc3ae3b4a2 Add support for documenting the parts of a multipart request
Closes gh-161
2016-05-12 16:30:36 +01:00