https://linen.dev logo
#help
Title
# help
m

Muthukkumar Ponnusamy

05/11/2023, 4:11 AM
Hi Team, I need a help. I see the responseDefinition is being applied to all the incoming request when defined. Is it normal?. When I create a simple stubs it works fine and when I create an extended stub with response transformer inside the same mapping folder, the extended stub works fine but the hello stub stops working and if I remove the extension(from command line) then the hello stub works but not the extension. The issue I see is when I enabled extension all my requests are first processed by(or sent) to the extension responder rather than the url based checking. Below are the details. { "request" : { "url" : "/hello", "method" : "GET" }, "response" : { "status" : 200, "body" : "hello world", "headers" : { "Content-Type" : "application/json;charset=utf-8", "Date" : "Fri, 05 May 2023 132214 GMT" } } } Extented code { "id" : "9e4f8ca4-23f1-4e7a-b078-8c1a9cbca156", "name" : "buyinghistory", "request" : { "urlPath" : "/buyinghistory", "method" : "GET", "queryParameters": { "start": { "matches": "^[0-9]{2}/[0-9]{2}/[0-9]{4}$" }, "stop": { "matches": "^[0-9]{2}/[0-9]{2}/[0-9]{4}$" } }, "customMatcher":{ "name": "date-range", "parameters": { "maxLength": 0 } } }, "response" : { "status" : 200, "headers" : { "Content-Type" : "text/plain;charset=UTF-8", "Keep-Alive" : "timeout=60" }, "transformers": ["buying-history"] }, "uuid" : "9e4f8ca4-23f1-4e7a-b078-8c1a9cbca156", } java -cp "wiremock-standalone-2.35.0.jar:wiremock-body-transformer-1.0.2.jar" com.github.tomakehurst.wiremock.standalone.WireMockServerRunner --extension com.test.extension.QueryDateRange,com.test.extension.BuyingHistory --local-response-templating --verbose
a

Aaron

05/11/2023, 1:38 PM
https://wiremock.org/docs/extending-wiremock/#non-global-transformations Did you turn off applying the extension globally?
m

Muthukkumar Ponnusamy

05/11/2023, 1:53 PM
Just got it the details from wiremock documents. Trying it out already.
fixed it. Thank you.
👍🏻 1