You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE: If the port is set to the default for the configured scheme (port 80 for HTTP or port 443 for HTTPS), it is omitted from any URIs in the generated snippets.
41
43
@@ -50,13 +52,11 @@ When using WebTestClient, the default base for URIs documented by Spring REST Do
50
52
You can customize this base by using the {spring-framework-api}/org/springframework/test/web/reactive/server/WebTestClient.Builder.html#baseUrl-java.lang.String-[ `baseUrl(String)` method on `WebTestClient.Builder`].
Copy file name to clipboardExpand all lines: docs/src/docs/asciidoc/contributing.adoc
+2
Original file line number
Diff line number
Diff line change
@@ -29,3 +29,5 @@ If you would like an enhancement to be made to Spring REST Docs, pull requests a
29
29
The source code is on {github}[GitHub].
30
30
You may want to search the {github}/issues?q=is%3Aissue[existing issues] and {github}/pulls?q=is%3Apr[pull requests] to see if the enhancement has already been proposed.
31
31
You may also want to {github}/issues/new[open a new issue] to discuss a possible enhancement before work on it begins.
Copy file name to clipboardExpand all lines: docs/src/docs/asciidoc/customizing-requests-and-responses.adoc
+2-3
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,6 @@ Preprocessing is configured by calling `document` with an `OperationRequestPrepr
8
8
You can obtain instances by using the static `preprocessRequest` and `preprocessResponse` methods on `Preprocessors`.
9
9
The following examples show how to do so:
10
10
11
-
====
12
11
[source,java,indent=0,role="primary"]
13
12
.MockMvc
14
13
----
@@ -29,7 +28,6 @@ Alternatively, you may want to apply the same preprocessors to every test.
29
28
You can do so by using the `RestDocumentationConfigurer` API in your `@Before` method to configure the preprocessors.
30
29
For example, to remove the `Foo` header from all requests and pretty print all responses, you could do one of the following (depending on your testing environment):
Then, in each test, you can perform any configuration specific to that test.
50
48
The following examples show how to do so:
51
49
52
-
====
53
50
[source,java,indent=0,role="primary"]
54
51
.MockMvc
55
52
----
@@ -130,3 +127,5 @@ If one of the built-in preprocessors does not meet your needs, you can write you
130
127
You can then use your custom preprocessor in exactly the same way as any of the built-in preprocessors.
131
128
132
129
If you want to modify only the content (body) of a request or response, consider implementing the `ContentModifier` interface and using it with the built-in `ContentModifyingOperationPreprocessor`.
0 commit comments