Skip to content

Commit 5be36f5

Browse files
committed
Merge branch '2.0.x'
2 parents c6b5c9b + f324611 commit 5be36f5

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ None of these is essential for a pull request, but they will all help
3131

3232
### Building from source
3333

34-
To build the source you will need Java 8 or later.
34+
To build the source you will need Java 17 or later.
3535
The code is built with Gradle:
3636

3737
```

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To learn more about Spring REST Docs, please consult the [reference documentatio
1414

1515
## Building from source
1616

17-
You will need Java 8 or later to build Spring REST Docs.
17+
You will need Java 17 or later to build Spring REST Docs.
1818
It is built using [Gradle][10]:
1919

2020
```

docs/src/test/java/com/example/mockmvc/ExampleApplicationJUnit5Tests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2021 the original author or authors.
2+
* Copyright 2014-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,14 +28,14 @@
2828
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
2929

3030
@ExtendWith(RestDocumentationExtension.class)
31-
public class ExampleApplicationJUnit5Tests {
31+
class ExampleApplicationJUnit5Tests {
3232

3333
@SuppressWarnings("unused")
3434
// tag::setup[]
3535
private MockMvc mockMvc;
3636

3737
@BeforeEach
38-
public void setUp(WebApplicationContext webApplicationContext, RestDocumentationContextProvider restDocumentation) {
38+
void setUp(WebApplicationContext webApplicationContext, RestDocumentationContextProvider restDocumentation) {
3939
this.mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext)
4040
.apply(documentationConfiguration(restDocumentation)) // <1>
4141
.build();

docs/src/test/java/com/example/restassured/ExampleApplicationJUnit5Tests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2021 the original author or authors.
2+
* Copyright 2014-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,14 +27,14 @@
2727
import static org.springframework.restdocs.restassured.RestAssuredRestDocumentation.documentationConfiguration;
2828

2929
@ExtendWith(RestDocumentationExtension.class)
30-
public class ExampleApplicationJUnit5Tests {
30+
class ExampleApplicationJUnit5Tests {
3131

3232
@SuppressWarnings("unused")
3333
// tag::setup[]
3434
private RequestSpecification spec;
3535

3636
@BeforeEach
37-
public void setUp(RestDocumentationContextProvider restDocumentation) {
37+
void setUp(RestDocumentationContextProvider restDocumentation) {
3838
this.spec = new RequestSpecBuilder().addFilter(documentationConfiguration(restDocumentation)) // <1>
3939
.build();
4040
}

docs/src/test/java/com/example/webtestclient/ExampleApplicationJUnit5Tests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2021 the original author or authors.
2+
* Copyright 2014-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,14 +27,14 @@
2727
import static org.springframework.restdocs.webtestclient.WebTestClientRestDocumentation.documentationConfiguration;
2828

2929
@ExtendWith(RestDocumentationExtension.class)
30-
public class ExampleApplicationJUnit5Tests {
30+
class ExampleApplicationJUnit5Tests {
3131

3232
@SuppressWarnings("unused")
3333
// tag::setup[]
3434
private WebTestClient webTestClient;
3535

3636
@BeforeEach
37-
public void setUp(ApplicationContext applicationContext, RestDocumentationContextProvider restDocumentation) {
37+
void setUp(ApplicationContext applicationContext, RestDocumentationContextProvider restDocumentation) {
3838
this.webTestClient = WebTestClient.bindToApplicationContext(applicationContext).configureClient()
3939
.filter(documentationConfiguration(restDocumentation)) // <1>
4040
.build();

spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/Preprocessors.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2019 the original author or authors.
2+
* Copyright 2014-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -149,7 +149,7 @@ public static ParametersModifyingOperationPreprocessor modifyParameters() {
149149

150150
/**
151151
* Returns a {@code HeadersModifyingOperationPreprocessor} that can then be configured
152-
* to modify the headers of the request.
152+
* to modify the headers of the request or response.
153153
* @return the preprocessor
154154
* @since 3.0.0
155155
*/

spring-restdocs-core/src/test/java/org/springframework/restdocs/operation/preprocess/HeadersModifyingOperationPreprocessorTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ public void removeNonExistentHeader() {
9090

9191
@Test
9292
public void removeHeader() {
93-
OperationPreprocessor preprocessor = this.preprocessor.remove("a");
94-
assertThat(preprocessor.preprocess(createRequest((headers) -> headers.add("a", "apple"))).getHeaders())
93+
this.preprocessor.remove("a");
94+
assertThat(this.preprocessor.preprocess(createRequest((headers) -> headers.add("a", "apple"))).getHeaders())
9595
.doesNotContainKey("a");
96-
assertThat(preprocessor.preprocess(createResponse((headers) -> headers.add("a", "apple"))).getHeaders())
96+
assertThat(this.preprocessor.preprocess(createResponse((headers) -> headers.add("a", "apple"))).getHeaders())
9797
.doesNotContainKey("a");
9898
}
9999

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public static MockMultipartHttpServletRequestBuilder multipart(String urlTemplat
231231
/**
232232
* Create a {@link MockMultipartHttpServletRequestBuilder} for a multipart request.
233233
* @param uri the URL
234-
* @return the builder for the file upload request
234+
* @return the builder for the multipart request
235235
* @since 2.0.6
236236
*/
237237
public static MockMultipartHttpServletRequestBuilder multipart(URI uri) {

0 commit comments

Comments
 (0)