Commit Graph

561 Commits

Author SHA1 Message Date
Andy Wilkinson
47bcc45e45 Upgrade dependencies 2017-09-23 18:00:17 +01:00
Andy Wilkinson
d22dc1e211 Include filename in Content-Disposition header when available
Closes gh-425
2017-09-23 17:40:22 +01:00
Andy Wilkinson
7c6c2e7523 Polish 2017-09-23 17:20:03 +01:00
Andy Wilkinson
a084175afd Fix field extraction and type resolution beneath arrays and wildcards
Fixes gh-422
Fixes gh-423
2017-09-23 16:40:12 +01:00
Andy Wilkinson
4854bc949f Fix type resolution for fields with null and non-null values
Closes gh-398
2017-09-23 16:40:07 +01:00
Andy Wilkinson
a123e06d06 Update build status image URL following changes to Bamboo 2017-07-17 09:02:55 +01:00
Andy Wilkinson
26707cd7ac Make sure that spring-aop is available at test runtime
Closes gh-411
2017-07-09 11:08:15 +01:00
Andy Wilkinson
a38a512033 Require occasionally null or absent field in array to be marked optional
Closes gh-402
2017-07-02 10:29:27 +01:00
Andy Wilkinson
a84bb0c569 Make new snippet relaxed when adding descriptors to relaxed snippet
Closes gh-400
2017-07-01 16:27:40 +01:00
Andy Wilkinson
214c068ece Remove Accept: */* header from REST Assured requests
Closes gh-404
2017-07-01 16:05:31 +01:00
Andy Wilkinson
eac0e2c2d3 Merge branch 'gh-398' into 1.2.x 2017-07-01 11:13:10 +01:00
Andy Wilkinson
6bf1edcd09 Improve handling of null fields beneath an array
Previously, if an array contained objects where a field was sometimes
null and sometimes had a value of a consistent type, the type inferred
type was varies. Furthermore, it was not possible for the user to
specify a type other than varies as a mismatch would be detected.

This commit updates JsonFieldTypeResolver so that, when dealing with
an imprecise field path (i.e. a path for a field within an array),
null values that don't match the common type for the field are
ignored. This produces the following behavior when nulls are involved:

- All null fields results in the null type
- A mixture of nulls and a particular type results in the particular
  type
- A mixture of nulls and two or more other types results in the varies
  type

Closes gh-398
2017-07-01 11:07:38 +01:00
Andy Wilkinson
5cef4745f7 Polish new response fields test and add equivalent for request fields
See gh-399
2017-07-01 10:57:26 +01:00
Nakul Chaudhari
288ebf771a Add a test that shows problem with sometimes null field within an array
Closes gh-399
2017-07-01 10:52:26 +01:00
Andy Wilkinson
dff9062a32 Fix formatting problems in the documentation
Previously, the included .adoc files did not consistently end with a 
blank line. In certain cases, Asciidoctor requires a blank line before a
new section. As a result, the lack of blank lines meant that some
section headings did not appear correctly.

This commit updates each of the included .adoc files in the
documentation to ensure that each ends with a blank line.
2017-06-30 19:56:56 +01:00
Andy Wilkinson
2650bd3bac Merge pull request #409 from Oliver Zeit
* gh-409:
  Fix formatting of reference to HeaderDocumentation in the docs
2017-06-30 19:56:19 +01:00
ooz
a8d51da4f4 Fix formatting of reference to HeaderDocumentation in the docs
Closes gh-409
2017-06-30 19:56:08 +01:00
Andy Wilkinson
ba327f1e9a Ensure that all nodes for a snippet refer to main document
Previously, when the operation block macro rendered the fragment
for a snippet, every top-level block in the fragment had its parent
set. Setting the parent has the side-effect of also setting the
block's document to be that of its parent. This meant that every
top-level block's document referred to the main document, but any
descendents were left with their document referring to the fragment
document. This did not cause a problem with the HTML backend (which
does not consider a block's document) but the PDF backend does
consider a block's document resulting in the descendents being
omitted from the generated PDF.

This commit updates the operation block macro to set the parent of
every block in the fragment to its correct value. This has the
side-effect of causing the block to update its document reference to
point to the main document.

Closes gh-396
2017-05-30 13:11:01 +01:00
Andy Wilkinson
56a0495288 Update the samples to use the latest snapshots 2017-05-12 20:10:47 +01:00
Spring Buildmaster
add6e6932e Next development version 2017-05-12 19:04:54 +00:00
Andy Wilkinson
a440c28283 Merge branch '1.1.x' 2017-05-12 12:39:29 +01:00
Andy Wilkinson
bd63fae662 Update dependency versions in the samples to use latest snapshots 2017-05-12 12:39:14 +01:00
Andy Wilkinson
113976f2d9 Support documenting fields in XML payloads with any content type
Previously, the document fields in an XML payload, the request or
response had to have an application/xml content type. This prevented
documenting standard XML content types such as text/xml and
application/rss+xml as well as payloads with custom XML content types.

This commit updates the logic that sets up the ContentHandler to
first attempt to parse the content as JSON. If that fails it then
parses it as XML. If that fails an exception is thrown. This allows
any JSON or XML content, irrespective of the actual content type, to
be documented.

Closes gh-393
2017-05-12 12:35:15 +01:00
Andy Wilkinson
88db798b25 Update the dependency versions in the samples to use latest snapshots 2017-05-12 12:35:05 +01:00
Andy Wilkinson
a996041384 Merge branch '1.1.x' 2017-05-11 15:17:41 +01:00
Andy Wilkinson
b00b13fed5 Upgrade to spring-asciidoctor-extensions 0.1.1.RELEASE 2017-05-11 15:17:30 +01:00
Andy Wilkinson
cf77eabe04 Use code block switch extension from separate project
This should have been merged forwards following the changes in
70df55d413.

See gh-229
2017-05-11 15:15:00 +01:00
Andy Wilkinson
835c1a5546 Merge pull request #389 from jd1
* gh-389:
  Add missing quotes around value of snippets attribute
2017-04-26 14:49:15 +01:00
JD
9d4a118993 Add missing quotes around value of snippets attribute
Closes gh-389
2017-04-26 14:47:52 +01:00
Andy Wilkinson
6a3535c559 Exclude spring-restdocs-asciidoctor from Spring IO checks 2017-04-26 12:12:43 +01:00
Andy Wilkinson
a5e3e153ad Do not include spring-restdocs-asciidoctor in API documentation
Closes gh-391
2017-04-26 12:10:16 +01:00
Andy Wilkinson
d6eacfd819 Avoid duplicate cookies with Spring Framework 5's MockMvc
Closes gh-390
2017-04-26 11:57:18 +01:00
Spring Buildmaster
3ea51f2afa Next development version 2017-04-24 15:18:10 +00:00
Andy Wilkinson
d1424c90ca Ensure that provided dependency on asciidoctorj appears in generated pom
Closes gh-385
2017-04-24 15:58:17 +01:00
Andy Wilkinson
a11423d1f5 Merge branch '1.1.x' 2017-04-24 15:56:35 +01:00
Spring Buildmaster
72d692107f Next development version 2017-04-24 13:19:52 +00:00
Andy Wilkinson
12b5927396 Merge pull request #383 from Gerrit Meier
* gh-383:
  Add plugin snapshot repository to Data REST sample
2017-04-24 13:09:22 +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
a91bc22b8e Merge pull request #379 from Tomasz Kopczynski
* gh-379:
  Include request body and response body default snippets list
2017-04-10 09:35:12 +01:00
Tomasz Kopczynski
30fa6bcc5f Include request body and response body default snippets list
Closes gh-379
2017-04-10 09:32:38 +01:00
Andy Wilkinson
9f67eaab70 List REST Assured dependencies as optional in pom
Previously, the use of compileOnly meant that the REST Assured
dependencies were omitted from pom for spring-restdocs-restassured.
This commit correct thr problem by using the propdeps' plugin's
optional configuration instead.

Closes gh-372
2017-04-07 17:03:32 +01:00
Andy Wilkinson
704257e93b Align generated Set-Cookie header with RFC 6265
Closes gh-378
2017-04-07 16:59:49 +01:00
Andy Wilkinson
93f4f11260 Merge pull request #377 from Johnny Lim
* gh-377:
  Fix typo in Asciidoctor attributes configuration
2017-03-31 11:36:59 +01:00
Johnny Lim
dd00ce05aa Fix typo in Asciidoctor attributes configuration
Closes gh-377
2017-03-31 11:36:51 +01:00
Andy Wilkinson
11483d738d Merge pull request #375 from Johnny Lim
* gh-375:
  Fix typo in name of local variable in CurlRequestSnippet
2017-03-28 09:22:50 +01:00
Johnny Lim
4a1facd1e6 Fix typo in name of local variable in CurlRequestSnippet
Closes gh-375
2017-03-28 09:22:37 +01:00
Andy Wilkinson
3262149283 Merge branch '1.1.x' 2017-03-24 14:46:38 +00:00
Andy Wilkinson
af0cd029c7 Ensure that samples' REST Docs version is updated before they are built 2017-03-24 14:42:09 +00:00
Andy Wilkinson
ea20363c62 Merge branch '1.1.x' 2017-03-23 12:36:19 +00:00