Skip to content

Commit d2a5bb2

Browse files
committed
Drop support for REST Assured until it supports Jakarta EE 9
Closes gh-761
1 parent 0f484e6 commit d2a5bb2

File tree

57 files changed

+23
-3899
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+23
-3899
lines changed

build.gradle

-5
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ subprojects { subproject ->
112112
samples {
113113
dependOn "spring-restdocs-core:publishToMavenLocal"
114114
dependOn "spring-restdocs-mockmvc:publishToMavenLocal"
115-
dependOn "spring-restdocs-restassured:publishToMavenLocal"
116115
dependOn "spring-restdocs-webtestclient:publishToMavenLocal"
117116
dependOn "spring-restdocs-asciidoctor:publishToMavenLocal"
118117

@@ -128,10 +127,6 @@ samples {
128127
workingDir "$projectDir/samples/testng"
129128
}
130129

131-
restAssured {
132-
workingDir "$projectDir/samples/rest-assured"
133-
}
134-
135130
webTestClient {
136131
workingDir "$projectDir/samples/web-test-client"
137132
}

docs/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ dependencies {
1919
internal(enforcedPlatform("org.springframework:spring-framework-bom:$springFrameworkVersion"))
2020

2121
testImplementation(project(":spring-restdocs-mockmvc"))
22-
testImplementation(project(":spring-restdocs-restassured"))
2322
testImplementation(project(":spring-restdocs-webtestclient"))
2423
testImplementation("jakarta.validation:jakarta.validation-api")
2524
testImplementation("junit:junit")

docs/src/docs/asciidoc/configuration.adoc

+1-40
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,6 @@ TIP: To configure a request's context path, use the `contextPath` method on
4646

4747

4848

49-
[[configuration-uris-rest-assured]]
50-
==== REST Assured URI Customization
51-
52-
REST Assured tests a service by making actual HTTP requests. As a result, URIs must be
53-
customized once the operation on the service has been performed but before it is
54-
documented. A
55-
<<customizing-requests-and-responses-preprocessors-modify-uris, REST-Assured-specific
56-
preprocessor>> is provided for this purpose.
57-
58-
59-
6049
[[configuration-uris-webtestclient]]
6150
==== WebTestClient URI Customization
6251

@@ -96,13 +85,6 @@ include::{examples-dir}/com/example/mockmvc/CustomEncoding.java[tags=custom-enco
9685
include::{examples-dir}/com/example/webtestclient/CustomEncoding.java[tags=custom-encoding]
9786
----
9887
99-
[source,java,indent=0,role="secondary"]
100-
.REST Assured
101-
----
102-
include::{examples-dir}/com/example/restassured/CustomEncoding.java[tags=custom-encoding]
103-
----
104-
====
105-
10688
TIP: When Spring REST Docs converts the content of a request or a response to a `String`,
10789
the `charset` specified in the `Content-Type` header is used if it is available. In its
10890
absence, the JVM's default `Charset` is used. You can configure the JVM's default
@@ -130,13 +112,6 @@ include::{examples-dir}/com/example/mockmvc/CustomFormat.java[tags=custom-format
130112
include::{examples-dir}/com/example/webtestclient/CustomFormat.java[tags=custom-format]
131113
----
132114

133-
[source,java,indent=0,role="secondary"]
134-
.REST Assured
135-
----
136-
include::{examples-dir}/com/example/restassured/CustomFormat.java[tags=custom-format]
137-
----
138-
====
139-
140115

141116

142117
[[configuration-default-snippets]]
@@ -168,12 +143,7 @@ include::{examples-dir}/com/example/mockmvc/CustomDefaultSnippets.java[tags=cust
168143
include::{examples-dir}/com/example/webtestclient/CustomDefaultSnippets.java[tags=custom-default-snippets]
169144
----
170145
171-
[source,java,indent=0,role="secondary"]
172-
.REST Assured
173-
----
174-
include::{examples-dir}/com/example/restassured/CustomDefaultSnippets.java[tags=custom-default-snippets]
175-
----
176-
====
146+
177147
178148
[[configuration-default-preprocessors]]
179149
=== Default Operation Preprocessors
@@ -198,12 +168,3 @@ include::{examples-dir}/com/example/webtestclient/CustomDefaultOperationPreproce
198168
----
199169
<1> Apply a request preprocessor that removes the header named `Foo`.
200170
<2> Apply a response preprocessor that pretty prints its content.
201-
202-
[source,java,indent=0,role="secondary"]
203-
.REST Assured
204-
----
205-
include::{examples-dir}/com/example/restassured/CustomDefaultOperationPreprocessors.java[tags=custom-default-operation-preprocessors]
206-
----
207-
<1> Apply a request preprocessor that removes the header named `Foo`.
208-
<2> Apply a response preprocessor that pretty prints its content.
209-
====

docs/src/docs/asciidoc/customizing-requests-and-responses.adoc

+2-28
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ include::{examples-dir}/com/example/webtestclient/PerTestPreprocessing.java[tags
2727
<1> Apply a request preprocessor that removes the header named `Foo`.
2828
<2> Apply a response preprocessor that pretty prints its content.
2929
30-
[source,java,indent=0,role="secondary"]
31-
.REST Assured
32-
----
33-
include::{examples-dir}/com/example/restassured/PerTestPreprocessing.java[tags=preprocessing]
34-
----
35-
<1> Apply a request preprocessor that removes the header named `Foo`.
36-
<2> Apply a response preprocessor that pretty prints its content.
37-
====
38-
3930
Alternatively, you may want to apply the same preprocessors to every test. You can do so
4031
by using the `RestDocumentationConfigurer` API in your `@Before` method to configure the
4132
preprocessors. For example to remove the `Foo` header from all requests and pretty print
@@ -58,15 +49,6 @@ include::{examples-dir}/com/example/webtestclient/EveryTestPreprocessing.java[ta
5849
<1> Apply a request preprocessor that removes the header named `Foo`.
5950
<2> Apply a response preprocessor that pretty prints its content.
6051

61-
[source,java,indent=0,role="secondary"]
62-
.REST Assured
63-
----
64-
include::{examples-dir}/com/example/restassured/EveryTestPreprocessing.java[tags=setup]
65-
----
66-
<1> Apply a request preprocessor that removes the header named `Foo`.
67-
<2> Apply a response preprocessor that pretty prints its content.
68-
====
69-
7052
Then, in each test, you can perform any configuration specific to that test. The
7153
following examples show how to do so:
7254

@@ -83,13 +65,6 @@ include::{examples-dir}/com/example/mockmvc/EveryTestPreprocessing.java[tags=use
8365
include::{examples-dir}/com/example/webtestclient/EveryTestPreprocessing.java[tags=use]
8466
----
8567
86-
[source,java,indent=0,role="secondary"]
87-
.REST Assured
88-
----
89-
include::{examples-dir}/com/example/restassured/EveryTestPreprocessing.java[tags=use]
90-
----
91-
====
92-
9368
Various built-in preprocessors, including those illustrated above, are available through
9469
the static methods on `Preprocessors`. See <<Preprocessors, below>> for further details.
9570
@@ -154,9 +129,8 @@ TIP: If you use MockMvc or a WebTestClient that is not bound to a server,
154129
you should customize URIs by <<configuration-uris, changing the configuration>>.
155130
156131
You can use `modifyUris` on `Preprocessors` to modify any URIs in a request
157-
or a response. When using REST Assured or WebTestClient bound to a server, this
158-
lets you customize the URIs that appear in the documentation while testing a
159-
local instance of the service.
132+
or a response. When using WebTestClient bound to a server, this lets you customize the
133+
URIs that appear in the documentation while testing a local instance of the service.
160134
161135
162136

0 commit comments

Comments
 (0)