Skip to content

Commit 8ef4042

Browse files
authored
Merge branch 'spring-projects:main' into fix/content-type-inference
2 parents 8467729 + a3cf191 commit 8ef4042

File tree

3 files changed

+30
-23
lines changed

3 files changed

+30
-23
lines changed

spring-restdocs-docs/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,24 @@ configurations {
5353
}
5454

5555
def aggregatedJavadoc = tasks.register('aggregatedJavadoc', Javadoc) {
56-
// dependsOn configurations.resolvedBom
5756
destinationDir = project.file(project.layout.buildDirectory.dir("docs/javadoc"))
5857
source = configurations.javadocSource
5958
classpath = configurations.javadocClasspath
6059
include("**/*.java")
6160
options {
6261
author = true
6362
docTitle = "Spring REST Docs ${project.version} API"
63+
links = [
64+
"https://docs.spring.io/spring-framework/docs/$springFrameworkVersion/javadoc-api/",
65+
"https://docs.hibernate.org/validator/9.0/api/",
66+
"https://jakarta.ee/specifications/bean-validation/3.1/apidocs/"
67+
] as String[]
6468
memberLevel = "protected"
6569
outputLevel = "quiet"
6670
splitIndex = true
6771
use = true
6872
windowTitle = "Spring REST Docs ${project.version} API"
6973
}
70-
// doFirst(new ConfigureJavadocLinks(configurations.resolvedBom, ["Spring Framework", "Spring Security", "Tomcat"]))
7174
}
7275

7376
project.rootProject.gradle.projectsEvaluated {

spring-restdocs-docs/src/docs/antora/modules/tutorial/pages/getting-started/index.adoc

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Maven::
3535
<plugin> <2>
3636
<groupId>org.asciidoctor</groupId>
3737
<artifactId>asciidoctor-maven-plugin</artifactId>
38-
<version>2.2.1</version>
38+
<version>3.2.0</version>
3939
<executions>
4040
<execution>
4141
<id>generate-docs</id>
@@ -74,46 +74,51 @@ Gradle::
7474
[source,indent=0,subs="verbatim,attributes"]
7575
----
7676
plugins { <1>
77-
id "org.asciidoctor.jvm.convert" version "3.3.2"
77+
id "org.asciidoctor.jvm.convert" version "4.0.5"
78+
}
79+
80+
asciidoctorj { <2>
81+
version = "3.0.0"
7882
}
7983
8084
configurations {
81-
asciidoctorExt <2>
85+
asciidoctorExt <3>
8286
}
8387
8488
dependencies {
85-
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor:{project-version}' <3>
86-
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc:{project-version}' <4>
89+
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor:{project-version}' <4>
90+
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc:{project-version}' <5>
8791
}
8892
89-
ext { <5>
93+
ext { <6>
9094
snippetsDir = file('build/generated-snippets')
9195
}
9296
93-
test { <6>
97+
tasks.named("test") { <7>
9498
outputs.dir snippetsDir
9599
}
96100
97-
asciidoctor { <7>
98-
inputs.dir snippetsDir <8>
99-
configurations 'asciidoctorExt' <9>
100-
dependsOn test <10>
101+
tasks.named("asciidoctor") { <8>
102+
inputs.dir snippetsDir <9>
103+
configurations 'asciidoctorExt' <10>
104+
dependsOn test <11>
101105
}
102106
----
103107
<1> Apply the Asciidoctor plugin.
104-
<2> Declare the `asciidoctorExt` configuration for dependencies that extend Asciidoctor.
105-
<3> Add a dependency on `spring-restdocs-asciidoctor` in the `asciidoctorExt` configuration.
108+
<2> Configure the Asciidoctor plugin to use the required version of AsciidoctorJ.
109+
<3> Declare the `asciidoctorExt` configuration for dependencies that extend Asciidoctor.
110+
<4> Add a dependency on `spring-restdocs-asciidoctor` in the `asciidoctorExt` configuration.
106111
This will automatically configure the `snippets` attribute for use in your `.adoc` files to point to `build/generated-snippets`.
107112
It will also allow you to use the `operation` block macro.
108113
It requires AsciidoctorJ 3.0.
109-
<4> Add a dependency on `spring-restdocs-mockmvc` in the `testImplementation` configuration.
114+
<5> Add a dependency on `spring-restdocs-mockmvc` in the `testImplementation` configuration.
110115
If you want to use `WebTestClient` rather than MockMvc, add a dependency on `spring-restdocs-webtestclient` instead.
111-
<5> Configure a `snippetsDir` property that defines the output location for generated snippets.
112-
<6> Make Gradle aware that running the `test` task will write output to the snippetsDir. This is required for https://docs.gradle.org/current/userguide/incremental_build.html[incremental builds].
113-
<7> Configure the `asciidoctor` task.
114-
<8> Make Gradle aware that running the task will read input from the snippetsDir. This is required for https://docs.gradle.org/current/userguide/incremental_build.html[incremental builds].
115-
<9> Configure the use of the `asciidoctorExt` configuration for extensions.
116-
<10> Make the task depend on the `test` task so that the tests are run before the documentation is created.
116+
<6> Configure a `snippetsDir` property that defines the output location for generated snippets.
117+
<7> Make Gradle aware that running the `test` task will write output to the snippetsDir. This is required for https://docs.gradle.org/current/userguide/incremental_build.html[incremental builds].
118+
<8> Configure the `asciidoctor` task.
119+
<9> Make Gradle aware that running the task will read input from the snippetsDir. This is required for https://docs.gradle.org/current/userguide/incremental_build.html[incremental builds].
120+
<10> Configure the use of the `asciidoctorExt` configuration for extensions.
121+
<11> Make the task depend on the `test` task so that the tests are run before the documentation is created.
117122
====
118123

119124

spring-restdocs-mockmvc/src/main/java/org/springframework/restdocs/mockmvc/MockMvcResponseConverter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ private String generateSetCookieHeader(Cookie cookie) {
107107

108108
private void appendIfAvailable(StringBuilder header, String value) {
109109
if (StringUtils.hasText(value)) {
110-
header.append("");
111110
header.append(value);
112111
}
113112
}

0 commit comments

Comments
 (0)