Norman Mahendra
03/16/2023, 8:57 AMpostServeAction
with the webhook extension and also include a transformer? I am working with json mappings. One use case for this is we want to generate an auth token for the callback. Right now as a workaround I am using StubRequestFilter
to enrich the originalRequest with the token I want and fetch this in the postServeAction via originalRequest.header, as a caveat this is applied to all mappings (at least from the documentation I don't see how to choose a stubbing and not globally)
Now we would also like to calculate a field based on some secret. If this was a simple response a responseTransformer would do the trick but it seems like postServeAction + webhook don't directly support this?Nicolas Homble
03/16/2023, 5:07 PMGiovanny Sayas
03/17/2023, 12:33 PMpostServeAction
but in a sync fashion instead of async?Rohit Manmath Binjagermath
03/17/2023, 3:01 PMOleg Nenashev
03/19/2023, 1:39 PMTom
03/19/2023, 1:50 PMDanny Paniagua
03/20/2023, 1:31 PM#eq
block - whatever I have setup now is always returning with the false condition. The simplified object coming in is
{
lender-type: 'installment',
cuId: '1234'
}
The goal is to use response templating to choose which json file to return. I have these sections in my mapping file:
"bodyPatterns": [{
"mathesJsonPath": "[?($.lenderId == 'installment')]"
}]
and then further down:
"response": {
"bodyFileName": "{{#eq (jsonPath request.body '$.cuId') '1234'}}respseon_file_A.json{{else}}response_file_B.json{{/eq}}"
}
The matchesJsonPath
bit seems to work fine as I know I am getting into this mapping file. The problem I'm running into as stated further up above is that when I try to test this logic, the #eq
block is always returning response_file_B.json
, no matter what cuId
field is getting passed. I'm assuming I have some bad character spacing in the handlebars syntax and not to sure how to debug it. Is there anything obvious that I'm doing wrong?Rohit Manmath Binjagermath
03/20/2023, 2:26 PMOleg Nenashev
03/20/2023, 7:42 PMRajesh Narayanappa
03/21/2023, 3:49 AMusingFilesUnderDirectory
method to save all files in different path. We observed for responses over 2MB response body was null. On further debugging, we found bigger size responses are going into this method - <https://github.com/wiremock/wiremock/blob/master/src/main/java/com/github/tomakehurst/wiremock/recording/SnapshotStubMappingPostProcessor.java#L61>
. and here rootDirectory is not path given at ``usingFilesUnderDirectory` method.
Suspected bug could be at this level as this looks for constant path which is __files
and not user provided path. Looks like this is bug. Please confirm.
Pre-cond:
• response size is >2MB
To overcome this issue, we have extended default bodyTextsize to make sure size condition is not met.Mohamed Amine BERGUIGA
03/21/2023, 10:21 AMLeon Witznick Schumacher
03/21/2023, 9:14 PMLeon Witznick Schumacher
03/21/2023, 9:14 PMLeon Witznick Schumacher
03/21/2023, 9:14 PMJorge Meireles
03/21/2023, 9:40 PMPalak
03/22/2023, 1:50 PMRania Zouari
03/22/2023, 3:43 PMVasu
03/22/2023, 4:12 PMRohit Manmath Binjagermath
03/23/2023, 5:20 AMRamya Vedagiri
03/23/2023, 9:36 AMTomas Belda
03/23/2023, 3:23 PMTom
03/23/2023, 4:56 PMPreethu Kg
03/23/2023, 9:53 PMOleg Nenashev
03/24/2023, 1:28 PMMikeismynick Smith
03/25/2023, 9:51 AMMikeismynick Smith
03/25/2023, 9:52 AMOleg Nenashev
03/25/2023, 11:32 AMsidi amine bouhamidi
03/26/2023, 9:02 PM{{now}}
. I looked everywhere to find out how to activate it. Could you please help me?
• How I start the container :
docker run -itd --rm -p 9000:8080 --name wiremock -v $PWD/mocks:/home/wiremock wiremock/wiremock
• My Stub in $PWD/mocks/stub-get-session-200.json
{
"request": {
"method": "GET",
"url": "/api/v1/session"
},
"response": {
"status": 200,
"jsonBody": {
"expiresAt": "{{now offset='900 seconds'}}"
},
"transformers": [
"response-template"
],
"headers": {
"Content-Type": "application/json"
}
}
}
• The response when I call the API <http://localhost:9000/api/v1/session>
{
"expiresAt": "{{now offset='900 seconds'}}"
}
Albert Vesker
03/27/2023, 2:43 PMAlbert Vesker
03/27/2023, 2:44 PMAlbert Vesker
03/27/2023, 2:44 PM