Commit Graph

219 Commits

Author SHA1 Message Date
Andy Wilkinson
2dda908c7e Polish "Use HTTPS for externals links where possible"
See gh-611
2019-03-26 12:00:27 +00:00
Spring Operator
cb5d7c2220 Use HTTPS for externals links where possible
See gh-611
2019-03-26 11:59:53 +00:00
Andy Wilkinson
c2c4ed7752 Merge branch '1.1.x' into 1.2.x 2019-03-26 11:45:06 +00:00
Andy Wilkinson
2cfe47a330 Merge branch '1.0.x' into 1.1.x 2019-03-26 10:53:52 +00:00
Andy Wilkinson
447cc4940e Polish "Use HTTPS for external links where possible"
See gh-609
2019-03-26 10:49:19 +00:00
Spring Operator
f2e60ea347 Use HTTPS for external links where possible
See gh-609
2019-03-26 10:28:47 +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
874ebba73d Polish "Fix links to ignored() in RequestDocumentation's javadoc"
See gh-595
2019-03-13 09:31:35 +00:00
clydebarrow
2f12c2de6a Fix links to ignored() in RequestDocumentation's javadoc
See gh-595
2019-03-13 09:27:42 +00:00
Andy Wilkinson
71198a402a Maintain formatting during subsection extraction
Closes gh-466
2018-11-22 11:33:34 +00:00
Andy Wilkinson
9e1ba8a922 Improve beneathPath to work with multiple matches with common structure
Closes gh-473
2018-11-22 11:00:23 +00:00
Andy Wilkinson
e23c6b45d4 Stop flagging documented field beneath option null field as missing
Closes gh-557
2018-11-01 07:03:29 +00:00
VonUniGE
1456c954ba Correct default output directory in ManualRestDocumentation javadoc
Closes gh-553
2018-10-03 17:52:47 +01:00
Andy Wilkinson
244a734232 Adopt Spring Java Format for code formatting and style 2018-08-08 14:08:15 +01:00
Andy Wilkinson
7431426cf3 Update tests to use AssertJ
Closes gh-537
2018-08-08 11:22:57 +01:00
Johnny Lim
7f86552670 Polish JsonContentHandler.isEmptyCollection()
Closes gh-535
2018-08-01 14:14:35 +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
Johnny Lim
5a8fe2f100 Polish
Closes gh-534
2018-08-01 11:37:07 +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
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
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
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
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
Johnny Lim
ae37bb2044 Fix typo in JsonContentHandlerTests
Closes gh-524
2018-07-03 09:35:55 +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
20bc7b3cd8 Polish 2018-06-25 17:07:37 +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
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
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
1c08000bcf Retain subsection extractor when adding field descriptors with prefix
Closes gh-480
2018-03-28 09:46:27 +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
Johnny Lim
da64c55fce Add HTTP method option unconditionally in curl command
Closes gh-488
2018-03-27 14:07:47 +01:00
Andy Wilkinson
95c4234c99 Format core code with Eclipse Oxygen's formatter 2018-03-27 12:53:34 +01:00
Andy Wilkinson
90c3549f55 Refine ordering of default, operation, and additional snippets
Previously, the ordering was:

1. Operation snippets
2. Default snippets
3. Additional snippets

This meant that any operation snippets (those specifically configured
for the documentation of the particular operation) would be
overwritten by the output of the default snippets.

This commit updates the ordering to the following:

1. Default snippets
2. Operation snippets
3. Additional snippets

Closes gh-453
2017-11-07 17:52:02 +00:00
Andy Wilkinson
07bca1875f Replace placeholders in snippet name as well as the operation name
Previously, StandardWriterResolver only replaced placeholders in the
operation name. This meant that the name and location of generated
snippets was unnecessarily limited.

This commit makes things more flexible by updating
StandardWriterResolver to replace placeholders in the snippet name
as well.

Closes gh-403
2017-10-20 10:56:07 +01:00
Andy Wilkinson
f62b0f3ce7 Support documentation of a required field beneath an optional field
Previously, if a field nested beneath an optional field was documented
and was required, it would be identified as missing even if its
optional ancestor was missing. This made it impossible to document
required fields of an optional subsection of a payload.

This commit updates JsonContentHandler to consider a field’s ancestors
when determining if it should be reported as missing. If the field
field has an optional ancestor that is not present, the field is not
considered to be missing if it too is not present. If the field has
an optional ancestor that is present then the field is considered to
be missing if it is not present.

Closes gh-429
2017-10-20 10:05:26 +01:00
Johnny Lim
aeb12673ae Polish tests
Closes gh-436
2017-10-20 09:39:59 +01:00
Andy Wilkinson
0c8ec11c9c Polish “Reuse ObjectMapper in FieldPathPayloadSubsectionExtractor” 2017-10-12 10:36:23 +01:00
Johnny Lim
9bd9fa31dc Reuse ObjectMapper in FieldPathPayloadSubsectionExtractor
Closes gh-431
2017-10-12 10:33:40 +01:00
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
a38a512033 Require occasionally null or absent field in array to be marked optional
Closes gh-402
2017-07-02 10:29:27 +01:00