Raise the minimum supported version of AsciidoctorJ to 3.0

Closes gh-957
This commit is contained in:
Andy Wilkinson
2025-01-30 16:28:44 +00:00
parent 85ebc4eb86
commit 0b103fdc0e
9 changed files with 118 additions and 37 deletions

View File

@@ -78,6 +78,7 @@ If you want to use `WebTestClient` or REST Assured rather than MockMvc, add a de
<4> Add `spring-restdocs-asciidoctor` as a dependency of the Asciidoctor plugin.
This will automatically configure the `snippets` attribute for use in your `.adoc` files to point to `target/generated-snippets`.
It will also allow you to use the `operation` block macro.
It requires AsciidoctorJ 3.0.
[source,indent=0,subs="verbatim,attributes",role="secondary"]
.Gradle
@@ -114,6 +115,7 @@ It will also allow you to use the `operation` block macro.
<3> Add a dependency on `spring-restdocs-asciidoctor` in the `asciidoctorExt` configuration.
This will automatically configure the `snippets` attribute for use in your `.adoc` files to point to `build/generated-snippets`.
It will also allow you to use the `operation` block macro.
It requires AsciidoctorJ 3.0.
<4> Add a dependency on `spring-restdocs-mockmvc` in the `testImplementation` configuration.
If you want to use `WebTestClient` or REST Assured rather than MockMvc, add a dependency on `spring-restdocs-webtestclient` or `spring-restdocs-restassured` respectively instead.
<5> Configure a `snippetsDir` property that defines the output location for generated snippets.

View File

@@ -28,6 +28,7 @@ This section covers how to include Asciidoc snippets.
You can use a macro named `operation` to import all or some of the snippets that have been generated for a specific operation.
It is made available by including `spring-restdocs-asciidoctor` in your project's <<getting-started-build-configuration, build configuration>>.
`spring-restdocs-asciidoctor` requires AsciidoctorJ 3.0.
The target of the macro is the name of the operation.
In its simplest form, you can use the macro to include all of the snippets for an operation, as shown in the following example: