diff --git a/spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClient.java b/spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClient.java index f8c896493a0..d28c8e79bb1 100644 --- a/spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClient.java +++ b/spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClient.java @@ -447,6 +447,9 @@ public interface WebTestClient { * Configure an {@link ApiVersionInserter} to abstract how an API version * specified via {@link RequestHeadersSpec#apiVersion(Object)} * is inserted into the request. + *

{@code ApiVersionInserter} exposes shortcut methods for several + * built-in inserter implementation types. See the class-level Javadoc + * of {@link ApiVersionInserter} for a list of choices. * @param apiVersionInserter the inserter to use * @since 7.0 */ diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/client/RestTestClient.java b/spring-test/src/main/java/org/springframework/test/web/servlet/client/RestTestClient.java index 7444b74c34b..82b49bbd44e 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/client/RestTestClient.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/client/RestTestClient.java @@ -263,6 +263,9 @@ public interface RestTestClient { * Configure an {@link ApiVersionInserter} to abstract how an API version * specified via {@link RequestHeadersSpec#apiVersion(Object)} * is inserted into the request. + *

{@code ApiVersionInserter} exposes shortcut methods for several + * built-in inserter implementation types. See the class-level Javadoc + * of {@link ApiVersionInserter} for a list of choices. * @param apiVersionInserter the inserter to use */ T apiVersionInserter(ApiVersionInserter apiVersionInserter); diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/request/AbstractMockHttpServletRequestBuilder.java b/spring-test/src/main/java/org/springframework/test/web/servlet/request/AbstractMockHttpServletRequestBuilder.java index 2540b45d8e8..f8caf80ab77 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/request/AbstractMockHttpServletRequestBuilder.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/request/AbstractMockHttpServletRequestBuilder.java @@ -496,6 +496,9 @@ public abstract class AbstractMockHttpServletRequestBuilder{@code ApiVersionInserter} exposes shortcut methods for several + * built-in inserter implementation types. See the class-level Javadoc + * of {@link ApiVersionInserter} for a list of choices. * @param versionInserter the inserter to use * @since 7.0 */ diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/setup/ConfigurableMockMvcBuilder.java b/spring-test/src/main/java/org/springframework/test/web/servlet/setup/ConfigurableMockMvcBuilder.java index 97d0b15bc99..50c946693c5 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/setup/ConfigurableMockMvcBuilder.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/setup/ConfigurableMockMvcBuilder.java @@ -80,6 +80,9 @@ public interface ConfigurableMockMvcBuilder{@code ApiVersionInserter} exposes shortcut methods for several + * built-in inserter implementation types. See the class-level Javadoc + * of {@link ApiVersionInserter} for a list of choices. * @param versionInserter the inserter to use * @since 7.0 */ diff --git a/spring-web/src/main/java/org/springframework/web/client/ApiVersionInserter.java b/spring-web/src/main/java/org/springframework/web/client/ApiVersionInserter.java index 2e61e54bec8..326228d70ee 100644 --- a/spring-web/src/main/java/org/springframework/web/client/ApiVersionInserter.java +++ b/spring-web/src/main/java/org/springframework/web/client/ApiVersionInserter.java @@ -23,8 +23,19 @@ import org.jspecify.annotations.Nullable; import org.springframework.http.HttpHeaders; /** - * Contract to determine how to insert an API version into the URI or headers - * of a request. + * Contract to insert an API version into the URI or headers of a request. + * + *

Use shortcut, static factory methods on this interface to create one of + * the built-in inserter type implementations: + *

+ * + *

Use the {@link #builder()} for further options such as if you want to also + * configure an {@link ApiVersionFormatter}. * * @author Rossen Stoyanchev * @since 7.0 diff --git a/spring-web/src/main/java/org/springframework/web/client/RestClient.java b/spring-web/src/main/java/org/springframework/web/client/RestClient.java index c3ad396c647..27fc83c58cb 100644 --- a/spring-web/src/main/java/org/springframework/web/client/RestClient.java +++ b/spring-web/src/main/java/org/springframework/web/client/RestClient.java @@ -347,6 +347,9 @@ public interface RestClient { * Configure an {@link ApiVersionInserter} to abstract how an API version * specified via {@link RequestHeadersSpec#apiVersion(Object)} * is inserted into the request. + *

{@code ApiVersionInserter} exposes shortcut methods for several + * built-in inserter implementation types. See the class-level Javadoc + * of {@link ApiVersionInserter} for a list of choices. * @param apiVersionInserter the inserter to use * @since 7.0 */ diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java index 87dc4e441c4..0a0dafbc77e 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java @@ -265,6 +265,9 @@ public interface WebClient { * Configure an {@link ApiVersionInserter} to abstract how an API version * specified via {@link RequestHeadersSpec#apiVersion(Object)} * is inserted into the request. + *

{@code ApiVersionInserter} exposes shortcut methods for several + * built-in inserter implementation types. See the class-level Javadoc + * of {@link ApiVersionInserter} for a list of choices. * @param apiVersionInserter the inserter to use * @since 7.0 */