mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
Static Mappings present in server but the request returns 404 #533
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dariooo512 on GitHub (Jul 21, 2023).
Describe the bug
I can't figure out how to make ReadStaticMappings work.
After calling ReadStaticMappings and verifying the server has mappings in the server.Mappings array, the following request yields 404.
Expected behavior:
After adding autogenerated mappings the server should return the body found in the json
Test to reproduce
Download and run this sample
Program.zip
OR
managetoken_gettoken-f14d4844-a3e0-4130-a830-03f71a7cdbe8.json-4 set the Property of this file 'Copy to output directory' to 'Copy if newer'
-5 Run the program
Other related info
The Stub was generated using Wiremock docker wiremock/wiremock:latest
@StefH commented on GitHub (Jul 21, 2023):
@dariooo512
Your mapping file looks like a WireMock.Org mapping file.
When reading static mappings, you need to use a WireMock.Net mapping file.
(There is limited in this project for using WireMock.Org mapping files.)
See