Comments (14)
Some possible options to solve this;
- I can add a new GET request like
requests?mappingGuid=123abc
- I can add the MappingGuid as nullable Guid to the RequestModel
What would be the best design?
from wiremock.net.
Hi,
Thanks for your reply.
The MappingGuid
isn't logically part of the RequestModel
, so adding it there would be a bit of a hack.
Ideally, the "find requests" endpoint would take an LogEntryModel
, not a RequestModel
, but that would be a breaking change...
I think a query parameter, as suggested in your first option, would be fine.
from wiremock.net.
@tlevesque-ueat
I can update the server code to support both the current RequestModel
and the LogEntryModel
as an input model. That would not introduce a breaking change.
from wiremock.net.
I can update the server code to support both the current
RequestModel
and theLogEntryModel
as an input model. That would not introduce a breaking change.
On the same endpoint? How would it differentiate between the two?
If possible, it would be perfect. And add an overload to the FindRequestsAsync
method in IWireMockAdminApi
from wiremock.net.
@tlevesque-ueat
I decided for the mappingGuid.
See PR:
#1043
An preview version 1.5.44-ci-18104
can be tested.
(https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions)
from wiremock.net.
That's perfect, thanks!
However I can't really test the preview, because I use the container version of WireMock.NET, which isn't updated yet, as far as I can tell.
I don't suppose you publish preview versions of the Docker container?
from wiremock.net.
I don't suppose you publish preview versions of the Docker container?
No, I do not have anything setup in the pipeline to also build a preview versions for docker versions.
from wiremock.net.
It's OK, I'll wait for the non-preview release. I have a workaround, so I'm not in a hurry.
from wiremock.net.
@tlevesque-ueat
A new version from the docker is published.
from wiremock.net.
Awesome, thanks! Will try it now
from wiremock.net.
It works fine, thanks!
Just one thing, though: it only returns one request, but there could be multiple requests that match the same mapping GUID... It would probably be better to return a collection of requests. I'll make some comments on the PR.
I should have reviewed more carefully when you made the PR, sorry about that...
from wiremock.net.
You can also create a PR yourself for that.
from wiremock.net.
Sure, I will. If you don't mind the breaking change (hopefully the new endpoint is recent enough that nobody is already relying on it...)
from wiremock.net.
from wiremock.net.
Related Issues (20)
- How to enable the Swagger UI HOT 1
- How to force a formatted DateTime to return a string? HOT 7
- Reset resets only mappings and logentries, not scenarios. HOT 3
- Save mappings to files HOT 5
- How to get a Random Long? HOT 4
- Is it possible to use WireMock as a middleware? HOT 7
- Make mapping filenames more user friendly HOT 3
- WithoutHeader fluent assertion HOT 6
- Modifying slightly the mocked response, seems to make the output be not parsable. HOT 5
- How to append request body properties for response templating? HOT 5
- WireMock.Net 1.5.46 is incompatible with TestContainers 3.7.0 (issue 1) HOT 7
- WireMock.Net 1.5.46 is incompatible with TestContainers 3.7.0 (issue 2) HOT 3
- 422 Unprocessable Entity HOT 2
- Incorrectly encoded logger output HOT 10
- Is there a way to access templated data after transformation? HOT 3
- How does WithBody work with request matchers? HOT 5
- Save proxied requests during an XUnit integration test? HOT 7
- Wiremock.net (C#) how to get a PDF from a Request body (form-data ) HOT 2
- External Mapping Storage HOT 21
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wiremock.net.