Hi,
I am using Wire Mock standalone jar. I want to mock the audio download that the api brings back in response using Wire Mock.
I have an JSON mapping under "mappings" dir
{"request":
{
"urlPath": "/v2/archive_files",
"method": "GET",
"queryParameters" : {
"from" : {
"matches" : "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2})Z$"
},
"to" : {
"matches" : "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2})Z$"
},
"page_size" : {
"matches" : "15"
},
"query_date_type" : {
"matches" : "archive_complete_time"
}
}
}, "response": {"bodyFileName": "archive_files.xml"}}
The contents of file archive_files.xml is in "__files" dir:
{"from":"2021-08-25T09:05:13Z","to":"2021-09-01T09:05:15Z","page_size":15,"next_page_token":"yE7m5a2Xrjl6sTwaXdovVxlBp3PgbC6cpI2","meetings":[{"uuid":"qqMZTqziRYCNnoaPHkGSyQ==","id":83122820832,"host_id":"SgKR-aakRfus5YjbX0nnVg","topic":"Client42's Zoom Meeting","type":1,"start_time":"{{date (parseDate request.query.from) offset='+4 hours'}}","timezone":"","duration":0,"total_size":1617957,"recording_count":2,"archive_files":[{"id":"469fb5d7-a0b2-47a1-88e0-9ed585e03ddd","file_type":"M4A","file_extension":"M4A","file_size":744318,"download_url":"
https://us06web.zoom.us/rec/archive/download/04hCulsA-uQFCP1SE0aNv14DgmpSx-H4FSsdBH1Gnf3C92wXt-QrSZrh17_eH-8JmKovxGXFSGqu9bm2.F_a92oCWxuw5TJ5m","status":"completed","recording_type":"audio_only"},{"id":"c9b93ae5-cc0d-4ee3-8821-339ed701ee72","file_type":"MP4","file_extension":"MP4","file_size":873639,"download_url":"
https://us06web.zoom.us/rec/archive/download/mBnPFeH9NBIc1omVjVouGsHFzRisAfndye3iqH0t8LoMrlMOMCeNRpwI49p9rGeGWlim1beSzhbRjBU_.Z8LF50I_CvtnbdOp","status":"completed","recording_type":"shared_screen_with_speaker_view"}]}]}
I want to mock the "download_url" value using Wire Mock but I am not sure what approach can be taken. Please can I get some suggestion as to what Wire Mock can offer to aid in this. Thanks!
Kind regards,
Fahima