Class RestCallAnalyzer
java.lang.Object
ru.vyarus.dropwizard.guice.test.client.builder.call.RestCallAnalyzer
Allows using direct call for a resource method to configure rest client endpoint: target url is configured from
method
Path annotation. Optionally, PathParam and QueryParam parameters could
be configured by providing non-null values.
Limitation: this will work only with methods with DIRECTLY applied annotations: neither implemented interface method (when annotations only on interface) nor overridden method would work.
- Since:
- 21.09.2025
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TestClientRequestBuilderconfigure(ResourceClient<T> client, Caller<T> method, @Nullable Object body) Configure rest client by direct resource method call.static <T> StringgetSubResourcePath(Class<T> type, Caller<T> method) Resolve sub resource mapping path from lookup method.
-
Method Details
-
configure
public static <T> TestClientRequestBuilder configure(ResourceClient<T> client, Caller<T> method, @Nullable Object body) Configure rest client by direct resource method call.Internally, javassist proxy is used to intercept method call.
Limitation: this will work only with methods with DIRECTLY applied annotations: neither implemented interface method (when annotations only on interface) nor overridden method would work.
- Type Parameters:
T- resource type- Parameters:
client- rest client instancemethod- consumer with a required method call insidebody- body object (could be null)- Returns:
- pre-configured builder
-
getSubResourcePath
Resolve sub resource mapping path from lookup method.- Type Parameters:
T- resource type- Parameters:
type- resource typemethod- lookup method caller- Returns:
- lookup method path
-