diff --git a/docs/src/docs/asciidoc/configuration.adoc b/docs/src/docs/asciidoc/configuration.adoc index 84855580..ceb607e5 100644 --- a/docs/src/docs/asciidoc/configuration.adoc +++ b/docs/src/docs/asciidoc/configuration.adoc @@ -6,10 +6,10 @@ [[configuration-uris]] === Documented URIs -NOTE: As REST Assured tests a service by making actual HTTP requests, the documented -URIs cannot be customized in this way. You should use the -<> instead. + + +[[configuration-uris-mockmvc]] +==== MockMvc URI customization When using MockMvc, the default configuration for URIs documented by Spring REST Docs is: @@ -42,6 +42,25 @@ TIP: To configure a request's context path, use the `contextPath` method on +[[configuration-uris-rest-assured]] +==== REST Assured URI customization + +REST Assured tests a service by making actual HTTP requests. As a result, URIs must be +customized once the operation on the service has been performed but before it is +documented. A <> is provided for this purpose. + + + +[[configuration-uris-webtestclient]] +==== WebTestClient URI customization + +When using WebTestClient, the documented URIs can be customized using the +{spring-framework-api}/org/springframework/test/web/reactive/server/WebTestClient.Builder.html#baseUrl-java.lang.String-[ +`baseUrl(String)` method on `WebTestClient.Builder`]. + + + [[configuration-snippet-encoding]] === Snippet encoding diff --git a/docs/src/docs/asciidoc/customizing-requests-and-responses.adoc b/docs/src/docs/asciidoc/customizing-requests-and-responses.adoc index dd33dbf6..458e47a1 100644 --- a/docs/src/docs/asciidoc/customizing-requests-and-responses.adoc +++ b/docs/src/docs/asciidoc/customizing-requests-and-responses.adoc @@ -143,8 +143,8 @@ parameters. [[customizing-requests-and-responses-preprocessors-modify-uris]] ==== Modifying URIs -TIP: If you are using MockMvc, URIs should be customized by <>. +TIP: If you are using MockMvc or WebTestclient, URIs should be customized by +<>. `modifyUris` on `RestAssuredPreprocessors` can be used to modify any URIs in a request or a response. When using REST Assured, this allows you to customize the URIs that appear diff --git a/docs/src/docs/asciidoc/index.adoc b/docs/src/docs/asciidoc/index.adoc index 5329cea2..eee9257f 100644 --- a/docs/src/docs/asciidoc/index.adoc +++ b/docs/src/docs/asciidoc/index.adoc @@ -14,6 +14,7 @@ Andy Wilkinson :templates: {source}spring-restdocs/src/main/resources/org/springframework/restdocs/templates :spring-boot-docs: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle :spring-framework-docs: https://docs.spring.io/spring-framework/docs/5.0.x/spring-framework-reference +:spring-framework-api: https://docs.spring.io/spring-framework/docs/5.0.x/javadoc-api [[abstract]]