Polishing

This commit is contained in:
Sam Brannen 2025-04-15 15:19:34 +02:00
parent aad742ded0
commit 5fb37e3133
3 changed files with 7 additions and 8 deletions

View File

@ -656,11 +656,11 @@ public interface WebTestClient {
/** /**
* Set an API version for the request. The version is inserted into the * Set an API version for the request. The version is inserted into the
* request by the {@link Builder#apiVersionInserter(ApiVersionInserter) * request by the {@linkplain Builder#apiVersionInserter(ApiVersionInserter)
* configured} {@code ApiVersionInserter}. * configured} {@code ApiVersionInserter}.
* @param version the API version of the request; this can be a String or * @param version the API version of the request; this can be a String or
* some Object that can be formatted the inserter, e.g. through an * some Object that can be formatted by the inserter — for example,
* {@link ApiVersionFormatter}. * through an {@link ApiVersionFormatter}
* @since 7.0 * @since 7.0
*/ */
S apiVersion(Object version); S apiVersion(Object version);

View File

@ -62,7 +62,7 @@ public class ApiVersionTests {
private Map<String, String> performRequest(Consumer<DefaultApiVersionInserter.Builder> consumer) { private Map<String, String> performRequest(Consumer<DefaultApiVersionInserter.Builder> consumer) {
DefaultApiVersionInserter.Builder builder = DefaultApiVersionInserter.builder(); DefaultApiVersionInserter.Builder builder = DefaultApiVersionInserter.builder();
consumer.accept(builder); consumer.accept(builder);
return (Map<String, String>) WebTestClient.bindToController(new TestController()) return WebTestClient.bindToController(new TestController())
.configureClient() .configureClient()
.baseUrl("/path") .baseUrl("/path")
.apiVersionInserter(builder.build()) .apiVersionInserter(builder.build())

View File

@ -36,8 +36,7 @@ public interface HttpServiceProxyRegistry {
* @return the proxy, or {@code null} if not found * @return the proxy, or {@code null} if not found
* @param <P> the type of HTTP Interface client proxy * @param <P> the type of HTTP Interface client proxy
* @throws IllegalArgumentException if there is no client proxy of the given * @throws IllegalArgumentException if there is no client proxy of the given
* type, or there is more than one client proxy of the given type. * type, or there is more than one client proxy of the given type
* given type exists across groups
*/ */
<P> P getClient(Class<P> httpServiceType); <P> P getClient(Class<P> httpServiceType);
@ -47,7 +46,7 @@ public interface HttpServiceProxyRegistry {
* @param httpServiceType the type of client proxy * @param httpServiceType the type of client proxy
* @return the proxy, or {@code null} if not found * @return the proxy, or {@code null} if not found
* @throws IllegalArgumentException if there is no group with the given * @throws IllegalArgumentException if there is no group with the given
* name, or no client proxy of the given type in the group. * name, or no client proxy of the given type in the group
* @param <P> the type of HTTP Interface client proxy * @param <P> the type of HTTP Interface client proxy
*/ */
<P> P getClient(String groupName, Class<P> httpServiceType); <P> P getClient(String groupName, Class<P> httpServiceType);
@ -61,7 +60,7 @@ public interface HttpServiceProxyRegistry {
* Return the HTTP service types for all client proxies in the given group. * Return the HTTP service types for all client proxies in the given group.
* @param groupName the name of the group * @param groupName the name of the group
* @return the HTTP service types * @return the HTTP service types
* @throws IllegalArgumentException if there is no group with the given name. * @throws IllegalArgumentException if there is no group with the given name
*/ */
Set<Class<?>> getClientTypesInGroup(String groupName); Set<Class<?>> getClientTypesInGroup(String groupName);