Hey, We are trying to update the request uri path ...
# pact-jvm
s
Hey, We are trying to update the request uri path in our provider contract test using below snippet. But we are getting an
org.junit.jupiter.api.extension.ParameterResolutionException: No ParameterResolver registered for parameter
exception. Can someone please help us on fixing it? If there is recommendation to use another approach, Can you please share?
Copy code
@TestTemplate
    @ExtendWith(PactVerificationInvocationContextProvider::class)
    fun pactVerificationTestTemplate(context: PactVerificationContext, requestBuilder: org.apache.hc.core5.http.HttpRequest) {
        var newUri = sanitiseUrl(requestBuilder.uri.toString())
        requestBuilder.setUri(URI(newUri))
        context.verifyInteraction()
    }
Dependencies used:
<http://au.com|au.com>.dius.pact.consumer.junit5
,
'org.apache.httpcomponents.core5', name: 'httpcore5', version: '5.1.3'
5
r
What version of Pact-JVM are you using?
s
I was able to resolve the issue by using
org.apache.http.HttpRequest
library, but there is no option to update the api path with this class. Do we have any suggestions or is it even possible to update the api path in provider contract verification step?
r
Why do you want to change the path?