question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why WireMock.net is not compatible with stubs from WireMock.org

See original GitHub issue

Hi,

We wanted to use stubs generated for WireMock.org (spirng contract testing). It seems that they are incompatible or we are using it in wrong way.

Example from WireMock.net: https://github.com/bredah/csharp-wiremock/blob/master/NetCore.2.2/Mock/__admin/mappings/example.json

Example of stub for WireMock.org:

{
  "id" : "f34b38df-059b-401d-a391-2c7e1b21258d",
  "request" : {
    "url" : "/api/Customers",
    "method" : "GET",
    "headers" : {
      "Content-Type" : {
        "equalTo" : "application/json"
      }
    }
  },
  "response" : {
    "status" : 200,
    "body" : "[{\"firstName\":\"Stub1\",\"lastName\":\"Kowalski\"},{\"firstName\":\"Stub2\",\"lastName\":\"Kowalski\"},{\"firstName\":\"Stub3\",\"lastName\":\"Nowak\"},{\"firstName\":\"Stub4\",\"lastName\":\"Nowak\"}]",
    "headers" : {
      "Content-Type" : "application/json; charset=utf-8"
    },
    "transformers" : [ "response-template" ]
  },
  "uuid" : "f34b38df-059b-401d-a391-2c7e1b21258d"
}

Do you have any converter?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
Ppiwowcommented, Sep 6, 2020

yes, but decission is really strange. standarization… specially if you were copying idea you could decide to make it compatible… this is json so easy to be compatible

0reactions
rodrigoramoscommented, Sep 16, 2021

Thank you so much.

Em qui., 16 de set. de 2021 09:37, Stef Heyenrath @.***> escreveu:

Some compatibility has been added.

You can now post Create a new single WireMock.org stub mapping or an array from WireMock.org mappings to /__admin/mappings/wiremock.org

Please try this functionality and create a new issue in case you miss something.

A new version will be released shortly.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/WireMock-Net/WireMock.Net/issues/491#issuecomment-920863274, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL64CMXKTC4YACXHAYY7KDUCHQHBANCNFSM4PCFIUQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.NET Solutions | WireMock
Compatibility Notice. WireMock.Net is not fully compatible with WireMock in terms of the configuration file formats and Administrative REST API. References:.
Read more >
Returning stubbed HTTP responses to specific requests
A core feature of WireMock is the ability to return canned HTTP responses for requests matching criteria. These are described in detail in...
Read more >
Proxying and proxy stub mappings
This supports a proxy/intercept setup where requests are by default proxied to another (possibly real, live) service, but where specific stubs are configured ......
Read more >
Matching and filtering HTTP requests in WireMock
WireMock supports matching of requests to stubs and verification queries using the following attributes.
Read more >
Extending WireMock via custom code
WireMock stub mappings consist in part of a ResponseDefinition . ... Only types compatible with JSON (strings, numbers, booleans, maps and lists) can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found