Getting all currently registered stub mappings #12

Closed
opened 2025-12-29 14:21:00 +01:00 by adam · 8 comments
Owner

Originally created by @StefH on GitHub (Jan 19, 2017).

Originally assigned to: @StefH on GitHub.

Originally created by @StefH on GitHub (Jan 19, 2017). Originally assigned to: @StefH on GitHub.
adam added the feature label 2025-12-29 14:21:00 +01:00
adam closed this issue 2025-12-29 14:21:00 +01:00
Author
Owner

@gregoks commented on GitHub (Jul 15, 2019):

Hi,

I was wondering if this is implemented? Because I see now that RequestMatchers in RequestMessageCompositeMatcher class is private. So is there a way we can get the instance of all registered mappings like we see them in the admin API?

Thx,

Greg

@gregoks commented on GitHub (Jul 15, 2019): Hi, I was wondering if this is implemented? Because I see now that RequestMatchers in RequestMessageCompositeMatcher class is private. So is there a way we can get the instance of all registered mappings like we see them in the admin API? Thx, Greg
Author
Owner

@StefH commented on GitHub (Jul 15, 2019):

Hello Greg; you can just access Mappings ?

Like
12444cc11e/test/WireMock.Net.Tests/FluentMockServerTests.Settings.cs (L102)

@StefH commented on GitHub (Jul 15, 2019): Hello Greg; you can just access `Mappings` ? Like https://github.com/WireMock-Net/WireMock.Net/blob/12444cc11e0c806a2436e2a823227dc757781b29/test/WireMock.Net.Tests/FluentMockServerTests.Settings.cs#L102
Author
Owner

@gregoks commented on GitHub (Jul 15, 2019):

Yeah but its an interface of IMapping, I want to be able to serialize it and send it as an object over http. Thats why I need the mapping info like path, request matchers, response etc as properties.

@gregoks commented on GitHub (Jul 15, 2019): Yeah but its an interface of IMapping, I want to be able to serialize it and send it as an object over http. Thats why I need the mapping info like path, request matchers, response etc as properties.
Author
Owner

@StefH commented on GitHub (Jul 15, 2019):

You know you can just do a GET request to the /__admin/mappings to get all mappings?

@StefH commented on GitHub (Jul 15, 2019): You know you can just do a GET request to the `/__admin/mappings` to get all mappings?
Author
Owner

@gregoks commented on GitHub (Jul 15, 2019):

Yeah I know but since I have the server object in memory, I was wondering if I could get the mappings the same way as I can get LogEntries without the need of extra http call

@gregoks commented on GitHub (Jul 15, 2019): Yeah I know but since I have the server object in memory, I was wondering if I could get the mappings the same way as I can get LogEntries without the need of extra http call
Author
Owner

@StefH commented on GitHub (Jul 15, 2019):

I see, can you create a new issue?

@StefH commented on GitHub (Jul 15, 2019): I see, can you create a new issue?
Author
Owner

@StefH commented on GitHub (Jul 16, 2019):

https://github.com/WireMock-Net/WireMock.Net/pull/298

@StefH commented on GitHub (Jul 16, 2019): https://github.com/WireMock-Net/WireMock.Net/pull/298
Author
Owner

@gregoks commented on GitHub (Jul 16, 2019):

Thanks @StefH for the quick response! Not sure if you still need it but I have created a new issue: https://github.com/WireMock-Net/WireMock.Net/issues/299

@gregoks commented on GitHub (Jul 16, 2019): Thanks @StefH for the quick response! Not sure if you still need it but I have created a new issue: https://github.com/WireMock-Net/WireMock.Net/issues/299
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#12