* 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
AsciidoctorJ 1.6 is not backwards compatible with AsciidoctorJ 1.5
and AsciidoctorJ 2.0 is not backwards compatible with AsciidoctorJ 1.6
or 1.5. The backwards incompatibilities are such that they cannot be
worked around using reflection so code needs to be compiled against
each of the three versions. To this end, this commit splits
spring-restdocs-asciidoctor into several separate modules:
1. spring-restdocs-asciidoctor-support
2. spring-restdocs-asciidoctor-1.5
3. spring-restdocs-asciidoctor-1.6
4. spring-restdocs-asciidoctor-2.0
spring-restdocs-asciidoctor-support contains support code that is not
tied to a specific version of AsciidoctorJ and can be used with
1.5, 1.6 and 2.0. The other three modules contain code that is
specific to a particular version of AsciidoctorJ. Each
version-specific module uses class names that are unique across all
three modules and is written in such a way that they will back off
when used in an environment with a different version of AsciidoctorJ.
The existing spring-restdocs-asciidoctor module has been modified to
merge the version specific jars and the support jar together into a
single jar that supports AsciidoctorJ 1.5, 1.6, and 2.0.
The above-described changes should allow users to depend upon
spring-restdocs-asciidoctor as before and to now be able to use
AsciidoctorJ 1.5, 1.6, or 2.0.
Closes gh-581