Hello, I'm currently working with WireMock to mock...
# help
d
Hello, I'm currently working with WireMock to mock a gRPC API, but I've encountered an issue. When I try to access the gRPC API, the requests are getting captured in the /__admin/requests endpoint but it is not getting captured in /mappings. Has anyone experienced a similar issue or have any advice on how to properly configure WireMock for gRPC? Any tips on troubleshooting this would be greatly appreciated! Below is the response body seeing in requests but not seeing in mappings. Is it coz of response not in JSON format? "bodyAsBase64": “dfdfdfdfdfdfdfdfdfdfdfdfdfdfdfxccxcxcxcxcxcxcxcxcxcxcxcxcxcxcxcxcxcxcxcxc”, "body": "{\"query\":\"query ($userIds: [String]){ user(ids:$userIds) { userId legacyUserId registrationSiteId countryOfResidence userAccountName userAccountType userAccountStatus userAccountCreationDate individualIdentityProfile { firstName lastName middleName email primaryPhone { phoneNumber } } businessIdentityProfile { businessEmail businessPrimaryPhone { phoneNumber } } businessStakeholders(stakeholderRoles:[\\\"LEGAL_CONTACT\\\"]){ firstName lastName middleName } extensions(namespace:[\\\”fgfgfgfgf\\\”, \\\”fgfgfgfgf\\\”, \\\”fgfgfgfgfgfg\\\”]) { key value } }}\",\"variables\":{\"userIds\”:[\”gfgfgfgfg\”,\”fgfgfgfgfgfgfg\”]}}”, "protocol": "HTTP/1.1", "scheme": "https", "host": “test”.com, "port": 443, "loggedDateString": "2025-01-02T212831.168Z", "queryParams":
Copy code
{}
, "formParams":
Copy code
{}
l
I am not sure I understand. The
/requests
admin endpoint shows the requests that are logged as a result of the requests sent to the wiremock server. The
/mappings
endpoint will return the stub mappings that you are using to mock your gRPC endpoints. What do you mean when you say it isn't getting captured in
/mappings
d
@Lee Turner -This is the step I followed, Step 1 : Start recording of a Mock Server Step 2 : Trigger the requests Step 3 : Stop the mock server My understanding is, when I hit this url https://mockingjay-12345..com/__admin/requests it returns me 1 object and https://mockingjay-12345.qa..com/__admin/mappings it gives me 0 mappings. So I believe the mapping should return 1 object So below the response data I’m seeing when I hit requests admin API "response": { "status": 200, "bodyAsBase64": “dfdfdfdfdfdfdfdfdfdfdfdfdfdfdfxccxcxcxcxcxcxcxcxcxcxcxcxcxcxcxcxcxcxcxcxc”, "body": "{\"query\":\"query ($userIds: [String]){ user(ids:$userIds) { userId legacyUserId registrationSiteId countryOfResidence userAccountName userAccountType userAccountStatus userAccountCreationDate individualIdentityProfile { firstName lastName middleName email primaryPhone { phoneNumber } } businessIdentityProfile { businessEmail businessPrimaryPhone { phoneNumber } } businessStakeholders(stakeholderRoles:[\\\"LEGAL_CONTACT\\\"]){ firstName lastName middleName } extensions(namespace:[\\\”fgfgfgfgf\\\”, \\\”fgfgfgfgf\\\”, \\\”fgfgfgfgfgfg\\\”]) { key value } }}\",\"variables\":{\"userIds\”:[\”gfgfgfgfg\”,\”fgfgfgfgfgfgfg\”]}}”, "protocol": "HTTP/1.1", "scheme": "https", "host": “test”.com, "port": 443, "loggedDateString": "2025-01-02T212831.168Z", "queryParams":
Copy code
{}
, "formParams":
Copy code
{}
@Lee Turner - any thoughts?
l
To be honest I wasn't sure that recording was supported with the gRPC extension
d
ok..