Giter Site home page Giter Site logo

Comments (14)

StefH avatar StefH commented on June 7, 2024

@tlevesque-ueat

Some possible options to solve this;

  1. I can add a new GET request like requests?mappingGuid=123abc
  2. I can add the MappingGuid as nullable Guid to the RequestModel

What would be the best design?

from wiremock.net.

tlevesque-ueat avatar tlevesque-ueat commented on June 7, 2024

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.

StefH avatar StefH commented on June 7, 2024

@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.

tlevesque-ueat avatar tlevesque-ueat commented on June 7, 2024

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.

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.

StefH avatar StefH commented on June 7, 2024

@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.

tlevesque-ueat avatar tlevesque-ueat commented on June 7, 2024

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.

StefH avatar StefH commented on June 7, 2024

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.

tlevesque-ueat avatar tlevesque-ueat commented on June 7, 2024

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.

StefH avatar StefH commented on June 7, 2024

@tlevesque-ueat
A new version from the docker is published.

from wiremock.net.

tlevesque-ueat avatar tlevesque-ueat commented on June 7, 2024

Awesome, thanks! Will try it now

from wiremock.net.

tlevesque-ueat avatar tlevesque-ueat commented on June 7, 2024

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.

StefH avatar StefH commented on June 7, 2024

You can also create a PR yourself for that.

from wiremock.net.

tlevesque-ueat avatar tlevesque-ueat commented on June 7, 2024

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.

tlevesque-ueat avatar tlevesque-ueat commented on June 7, 2024

#1046

from wiremock.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.