* gh-653:
Polish "Fix NPE in HttpResponseSnippet when response has custom status"
Fix NPE in HttpResponseSnippet when response has custom status
Closes gh-653
Previously, when a document had a leveloffset attribute this was
included in the attributes used when loading a snippet in the
operation block macro. This could lead to warnings about section
titles being out of sequence as the level used for the title did not
take the leveloffset into consideration.
This commit clones the documents attributes and removes any
leveloffset attribute before loading a snippet. This removes the
need for the leveloffset to be considered when loading a snippet
fragment. As before, the level of each block in the fragment loaded
from snippet is then set prior to adding the block to the main
document. This takes the leveloffset into consideration.
Closes gh-649
Previously empty parameters in a query string were handled
inconsistently such that they sometimes had a value of "" in a list
and sometimes were represented as an empty list. This inconsistency
lead to the parameter appearing twice in the cURL request snippet.
This commit removes the inconsistency by always using an empty string
to represent an empty query parameter value.
Fixes gh-647
* gh-638:
Polish "Prevent unwanted incrementing of section number in operation macro"
Prevent unwanted incrementing of section number in operation macro
Closes gh-638
This updates REST Docs to test against Framework's latest 5.1
snapshot. Due to a bug in the behaviour of HttpHeaders' key set [1],
HeaderRemovingOperationPreprocessor has been updated to no longer use
it when removing headers from a request or response prior to it being
documented.
[1] https://github.com/spring-projects/spring-framework/issues/22821
Renderings with standard section depth first to avoid warnings that
document starts with level 3 headings. Adjust block level when
adding the content to the parent.
See gh-628
Previously, when adding blocks for the snippets' content, the
operation macro would call Asciidoctor to load the content with
attributes that only included the projectdir. This resulted in a
failure in environments that did not set the projectdir and instead
relied on another attribute, such as gradle-projectdir as used by
the latest versions of the Asciidoctor Gradle plugin.
This commit updates the macro to reuse all of the main document's
attributes when loading the snippets' content, thereby ensuring that
any attributes available in the main document are also available
during snipppet processing.
Closes gh-624