mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
Why WireMock.net is not compatible with stubs from WireMock.org #283
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 @Ppiwow on GitHub (Jul 20, 2020).
Originally assigned to: @StefH on GitHub.
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:
Do you have any converter?
@StefH commented on GitHub (Jul 20, 2020):
Hello @Ppiwow,
I'm sorry for the confusion, this project does indeed use a different JSON mapping file. The mappings are similar as idea, but the content differs.
See this youtube for some info:
https://youtu.be/IJa6DyJOxzk?t=436
@StefH commented on GitHub (Sep 6, 2020):
@Ppiwow Does this answer your question, or do you need more help?
@Ppiwow commented on GitHub (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
@StefH commented on GitHub (Feb 18, 2021):
Hello @Ppiwow, I understand your statement, however when starting this project, I already had to deviate from some concepts from WireMock.Java so that resulted in another JSON Mapping file.
Maybe I'll create a converter some day, but not planned for short time.
@rodrigoramos commented on GitHub (Aug 31, 2021):
Hi there! I have same problem here. We're creating a project which contains more than .NET technology (Python and Java) and it has been difficult to share those mappings across the projects.
Actually, that might invalidate the use of this marvelous tool at all.
Is it possible to help to create some kind of "importer" or something like the converter that you mentioned above?
@StefH commented on GitHub (Aug 31, 2021):
@Ppiwow and @rodrigoramos
Can you help me by providing the model (Java) and the JSON file which the current wiremock.org uses?
And what would preferred?
(Note that a 100% match will never be possible...)
@rodrigoramos commented on GitHub (Sep 9, 2021):
Hi @StefH! Thanks for your answer. IMO, I'd preferred an "import/read" capability.
I cannot share exactly the models that I'm working on (company's policy) but I can share some samples that I created in order to understand the Playback/Recording functionality.
GET Sample
POST Sample
@StefH commented on GitHub (Sep 12, 2021):
@rodrigoramos
Something like
ImportWireMockOrg(string path)as public method on WireMockServer?@StefH commented on GitHub (Sep 12, 2021):
@rodrigoramos & @Ppiwow
I've create a preview version
WireMock.1.4.21-preview-04-ci-15384which has an extra method to import 1 json file.https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions
In the next days, I'll add more logic and unittests. And if you encounter issues, please write tehse here.
@StefH commented on GitHub (Sep 16, 2021):
https://github.com/WireMock-Net/WireMock.Net/pull/631
@StefH commented on GitHub (Sep 16, 2021):
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.orgPlease try this functionality and create a new issue in case you miss something.
A new version will be released shortly.
@rodrigoramos commented on GitHub (Sep 16, 2021):
Thank you so much.
Em qui., 16 de set. de 2021 09:37, Stef Heyenrath @.***>
escreveu: