Commit Graph

755 Commits

Author SHA1 Message Date
Andy Wilkinson
6e7dc7c95f Merge branch '1.2.x' 2018-08-08 09:57:58 +01:00
Andy Wilkinson
39a5198c3b Upgrade the Grails sample to Grails 3.3.x and Gradle 4.9
Closes gh-540
2018-08-08 09:57:15 +01:00
Andy Wilkinson
26e5cddb45 Merge branch '1.2.x' 2018-08-01 14:15:02 +01:00
Andy Wilkinson
8bc5b4e27e Merge pull request #535 from Johnny Lim
* gh-535:
  Polish JsonContentHandler.isEmptyCollection()
2018-08-01 14:14:53 +01:00
Johnny Lim
7f86552670 Polish JsonContentHandler.isEmptyCollection()
Closes gh-535
2018-08-01 14:14:35 +01:00
Andy Wilkinson
8055319b89 Use Bean Validations @NotBlank rather than Hibernate Validator's
Closes gh-536
2018-08-01 14:12:40 +01:00
Andy Wilkinson
2ae5f0d936 Merge pull request #532 from Nik Gorylenko
* gh-532:
  Polish "Move away from deprecated RestAssuredPreprocessors.modifyUris()"
  Move away from deprecated RestAssuredPreprocessors.modifyUris()
2018-08-01 14:08:33 +01:00
Andy Wilkinson
857e29a3c9 Polish "Move away from deprecated RestAssuredPreprocessors.modifyUris()"
See gh-532
2018-08-01 14:01:10 +01:00
Nik Gorylenko
d8070aed46 Move away from deprecated RestAssuredPreprocessors.modifyUris()
Closes gh-532
2018-08-01 13:59:59 +01:00
Andy Wilkinson
824e8d6ddf Merge branch '1.2.x' 2018-08-01 12:00:03 +01:00
Andy Wilkinson
1d52ba86a0 Merge pull request #530 from Johnny Lim
* gh-530:
  Polish "Consistently use ID-based equality check for TemplateFormat"
  Consistently use ID-based equality check for TemplateFormat
2018-08-01 11:51:23 +01:00
Andy Wilkinson
d57fa02254 Polish "Consistently use ID-based equality check for TemplateFormat" 2018-08-01 11:47:49 +01:00
Johnny Lim
d05f6cdb6a Consistently use ID-based equality check for TemplateFormat
Closes gh-530
2018-08-01 11:43:52 +01:00
Andy Wilkinson
5bc873810c Merge branch '1.2.x' 2018-08-01 11:39:24 +01:00
Andy Wilkinson
93cb08a4cc Merge pull request #534 from Johnny Lim
* gh-534:
  Polish
2018-08-01 11:37:49 +01:00
Johnny Lim
5a8fe2f100 Polish
Closes gh-534
2018-08-01 11:37:07 +01:00
Andy Wilkinson
5f10e01465 Merge branch '1.2.x' 2018-07-19 16:57:50 +01:00
Andy Wilkinson
6d6909bfeb Update the samples to use 2.0.3 snapshots 2018-07-19 16:57:38 +01:00
Spring Buildmaster
d0367643f4 Next development version 2018-07-19 13:52:50 +00:00
Andy Wilkinson
8bb460170c Update the samples to use 1.2.6 snapshots 2018-07-19 12:51:24 +01:00
Spring Buildmaster
589a89fbcb Next development version 2018-07-19 11:18:16 +00:00
Andy Wilkinson
71d53664bb Merge branch '1.2.x' 2018-07-19 11:19:22 +01:00
Andy Wilkinson
81b55d470b Refine missing field detection logic for paths with multiple arrays
Previously, missing field detection worked correctly for paths
containing a single array, but if the path contained multiple arrays
the extracted value would be a list containing a single empty list.
In this case the field would not be considered missing when, in fact
it should have been.

This commit updates the missing field detection logic to recursively
examine the extracted value and, when it's a collection, the values
that it contains. As a result, a field will be considered to be
missing if it isn't present, if it's an empty collection, or if it's
a collection that only contains empty collections or, to any depth,
collections of empty collections.

Closes gh-519
2018-07-19 11:11:38 +01:00
Andy Wilkinson
47fe048693 Merge branch '1.2.x' 2018-07-16 17:10:08 +01:00
Andy Wilkinson
001fb388b0 Merge pull request #525 from Johnny Lim
* gh-525:
  Remove unnecessary FieldDoesNotExistException handling
2018-07-16 17:06:32 +01:00
Johnny Lim
5ace000c75 Remove unnecessary FieldDoesNotExistException handling
Previously, FieldDoesNotExistException was caught when extracting
a field to determine whether or not it is missing (absent or an
empty collection). The handling is redundant due to an earlier call
to hasField so this commit removes it.

Closes gh-525
2018-07-16 16:09:47 +01:00
Andy Wilkinson
c0ae004988 Merge branch '1.2.x' 2018-07-16 16:05:26 +01:00
Andy Wilkinson
02e842dc89 Merge pull request #526 from Johnny Lim
* gh-526:
  Polish "Remove redundant static modifier for enums"
  Remove redundant static modifier for enums
2018-07-16 16:05:22 +01:00
Andy Wilkinson
cae53fdf3c Polish "Remove redundant static modifier for enums"
See gh-526
2018-07-16 16:05:02 +01:00
Johnny Lim
559357e211 Remove redundant static modifier for enums
Closes gh-526
2018-07-16 16:03:36 +01:00
Andy Wilkinson
d59886df31 Merge branch '1.2.x' 2018-07-16 15:56:54 +01:00
Andy Wilkinson
a2a9a7cb0f Stop type determination from changing descriptor's type
Previously, when a field's type was automatically determined, the
type of the passed-in descriptor was changed. This could cause
problems if the descriptor was reused in another test.

This commit updates AbstractFieldsSnippet to create a copy of each
descriptor so that setting the determined type does not affect the
type of the original descriptor.

Closes gh-511
2018-07-16 15:50:34 +01:00
Andy Wilkinson
6a38ed26f3 Restore compatibility with Spring Framework 5.1 when reading request parts
Closes gh-528
2018-07-16 11:29:13 +01:00
Andy Wilkinson
cfb67291ed Update WebTestClient integration test for path parameters table title change
See gh-527
2018-07-16 11:08:22 +01:00
Andy Wilkinson
7ab94c4050 Merge branch '1.2.x' 2018-07-16 11:07:12 +01:00
Andy Wilkinson
920ced0755 Preserve cookies when preprocessing a request to modify its URIs
Closes gh-523
2018-07-16 10:48:50 +01:00
Andy Wilkinson
74abcd3166 Merge branch '1.2.x' 2018-07-16 10:40:15 +01:00
Andy Wilkinson
e14bda0893 Disable interpolation of Asciidoctor path parameter table's title
Previously, when generating Asciidoctor snipppets, the title of the
path parameter table was interpolated. The title of the table is the
path including its parameters. The parameters are typically surrounded
by { and }. This is the same syntax used for attributes in
Asciidoctor. With interpolation enabled this caused Asciidoctor to
interpret the parameter as an attribute reference and attempt to
replace it. This would either result in unwanted replacement of the
parameter with the value of the attribute or it would result in a
warning about a missing attribute.

This commit surrounds the title of the table with + characters. This
disables all interpolation for the title, thereby preventing
unwanted replacement or attempted replacement of the path's
parameters.

Closes gh-527
2018-07-16 10:30:14 +01:00
Andy Wilkinson
9aad1bbf96 Merge branch '1.2.x' 2018-07-03 09:36:37 +01:00
Andy Wilkinson
e1948f29b1 Merge pull request #524 from Johnny Lim
* gh-524:
  Fix typo in JsonContentHandlerTests
2018-07-03 09:36:21 +01:00
Johnny Lim
ae37bb2044 Fix typo in JsonContentHandlerTests
Closes gh-524
2018-07-03 09:35:55 +01:00
Andy Wilkinson
c086da81f8 Merge branch '1.2.x' 2018-06-26 12:14:56 +01:00
Andy Wilkinson
7bde04ea46 Consider sometimes present field beneath optional array to not be missing
The changes made in 7476562d inadvertently caused a field that is
an descendant of an array and a child of an optional field to be
considered missing when its parent is only sometimes present. Due to
the parent being optional, the parent’s absence should not cause the
absent child to be considered to be missing.

Closes gh-519
2018-06-26 12:14:41 +01:00
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