mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
GetAdminMappingsResult in WireMock.Org.Abstractions should contain list of mappings #554
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 @roengstrom on GitHub (Nov 23, 2023).
Originally assigned to: @StefH on GitHub.
Describe the bug
When running a dedicated instance of Wiremock in a docker container I cannot fetch the configured mappings. It seems like
GetAdminMappingsResultexpects an instance ofMappingsbut according to the Wiremock API documentation, this should not be an object but an array. So when I call the method I get an exception:Expected behavior:
I expect to not get an exception and instead get an instance of
GetAdminMappingsResultcontaining a list of mappings.Test to reproduce
@StefH commented on GitHub (Nov 28, 2023):
https://github.com/WireMock-Net/WireMock.Net/pull/1023
@StefH commented on GitHub (Nov 28, 2023):
@roengstrom
Please note that this API is not 100% guaranteed to be compatible with the WireMock.Org version, however I did change the code, can you please test preview
1.5.40-ci-17965?https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions
@roengstrom commented on GitHub (Dec 4, 2023):
@StefH I tested it out and fetching the mappings works fine now, nice work!
Is the idea of this client that it should be fully compatible with standalone Wiremock instances? Because like you mention, there's no guarantee that it works, and indeed I've encountered other issues as well unfortunately. But if the intention is for it to be fully compatible it would be nice to get it working, because as far as I can tell, there doesn't seem to exist any dotnet client for standalone Wiremock.
@StefH commented on GitHub (Dec 4, 2023):
@roengstrom
In the beginning I used the openapi-specification from WireMock.Org to generate the classes + api (I was trying to use https://github.com/StefH/RestEase-Client-Generator).
And then I did have to update some code manually to get it working.
If it's not too much work, I can try to build a 100% working .NET client, however I need to some and some help from the community for that. (I will also reach out to WireMock.Org)
So if you find other issues, please list these here, or create a PR.
@roengstrom commented on GitHub (Dec 4, 2023):
@StefH I'll see if I can make time and create a PR. :) Thank you
@StefH commented on GitHub (Dec 5, 2023):
Do you want to continue your PR on from my branch/PR or should I merge my PR to master so that you can fork and make your own branch?
@roengstrom commented on GitHub (Dec 6, 2023):
@StefH I'm thinking you can merge and I'll work from master in that case.
@StefH commented on GitHub (Dec 6, 2023):
It's merged.